UseCopy Page Treeto copy a tree of pages to anywhere else. 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:
Enter a space inSource Spaceto select the space the page tree is copied from.
Select the checkbox next to the page tree you want to work with forSource Page Trees.
Enter a space inTarget Spaceto select the page the information is copied to.
Select a checkbox next to the page tree that you want the information to be copied to inTarget Page.
Enter the text you want at the beginning of the title in Title Prefix.
Enter the text you want at the end of the title in Title Suffix.
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.
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.
SelectRun. You can selectPreviewinstead ofRunto view changes before implementing them. Once you selectRun, theResultsof the script appear.
Example Scenario
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, usingCopy 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."