Copy Pages

Use Copy Pages to copy a page tree or pages from one location to another. To run the built-in script, you must have permission to view all the pages you are copying and permission to edit the target root page.

Follow these steps to run the built-in script:

  1. Enter a space in Source Space to select the space the page tree is copied from.

  2. Select the checkbox next to the page tree or pages you want to work with for Source Pages.

  3. Enter a space in Target Space to select the page the information is copied to.

  4. Select a checkbox next to the page that you want the information to be copied to in Target Page.

  5. Enter the text you want at the beginning of the title in Title Prefix

  6. Enter the text you want at the end of the title in Title Suffix

  7. Use Title Replace to find and replace words in a title when copying.

    To copy a page within the same space, manipulate the titles with a groovy closure because titles must be unique.

  8. Use the checkboxes for Inline Comments and Page Comments to choose to copy that content with the pages.
  9. Use the Notifications checkbox to send notifications for the update.
  10. Use Code Transform to transform parts of the Confluence page with custom code.
    Click Show Snippets for examples of custom code that you could use in this field.

  11. Select Run.
    You can select Preview instead of Run to view changes before implementing them.
    Once you select Run, the Results of the script appear.

Example

When a new version of a product is released, product documentation is released with it. You can copy the entire documentation page tree, version v1.0, using Copy Page Tree. When the next version of the product is released, copy the v1.0 tree and convert v1.0 to v2.0.

Links and image links within the copied page tree automatically update to reflect any new page titles. If you have a link where "v1.0 Product Doc/Introduction" links to "v1.0 Product Doc/Getting Started", the copied page tree "Introduction" links to "v2.0 Product Doc/Getting Started."

On this page