This script will move all the children of a page to another parent.
Code Block |
---|
language | java |
---|
linenumbers | true |
---|
|
number parent = getPage("CTR", "Move pages in bulk"); //parent page
number newParent = getPage("CTR", "New parent page"); //destination of moved pages
number [] childPages = getChildPages(parent); //get child pages
//loop through child pages
for(number child in childPages) {
//sample syntax - movePage(pageId, newParentPageId)
movePage(child, newParent);
} |
See Other Recipes
Filter by label (Content by label) |
---|
showLabels | false |
---|
showSpace | false |
---|
cql | label = "pages" |
---|
|
See More Documentation
Filter by label (Content by label) |
---|
showLabels | false |
---|
showSpace | false |
---|
cql | label = "page_routines" |
---|
|