Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This script will clone a page and place it under a different parent pagecopy the content of a pageĀ into another page.

Code Block
languagejava
linenumberstrue
number source = getPage("CTR", "CloneCopy a page"); //page to clonecopy
number newParent = getPage("CTR", "HomeNew copy a page"); //parentdestination for the clonedcopied page 
//clones page tree, adds "Copy of " to the begining of new page titles, and copys permissions of source
content

//sample syntax - clonePagecopyPageContent(pageIdsourcePageId, parentId, titletargetPageId);


number clone = clonePageTreereturn copyPageContent(source, newParent, "Copy of ", true));


See Other Recipes

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "pages"

...