A beta version of this macro, which is attached to this page, is available for download and testing. Please go to the Information request form request more details.
Features
The users can copy a tree of pages to another space, or to another location within the same space.
The pages that are copied have their names, labels and contents modified during the search, as per a search and replace function
Implementation
Usage
{copypages}
Parameters
pageName - The name of the page that will be copied (along with all its children)
parentName - The name of the page that will be the parent of the new page
rootSpaceKey - the space of the page that will be copied.
targetSpaceKey - The name of the space where the new pages will be created
oldValue - The text that will be removed from the page and substituted with the newValue. This is a regular expression.
newValue - The new text value that will be used in the new pages
Since the macro does not execute directly, none of the parameters are required. The parameters that are supplied in the macro will be used to populate the copy pages form that the macro generates. The form will remember any values that are added to it and these remembered values will superceed the macros parameters.