This script will clone a page and place it under a different parent pagecopy the content of a pageĀ into another page.
Code Block |
---|
language | java |
---|
linenumbers | true |
---|
|
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) |
---|
showLabels | false |
---|
showSpace | false |
---|
cql | label = "pages" |
---|
|
...