Versions Compared

Key

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

This script will move all the children of a page to another parent.

Code Block
languagejava
linenumberstrue
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)
showLabelsfalse
showSpacefalse
cqllabel = "pages"

See More Documentation

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