Move pages in bulk

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

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

See More Documentation