Versions Compared

Key

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

Syntax

clonePageTree(sourcePageId, targetPageId, titlePrefix, copyPermissions);

Description

Excerpt

Clones the page tree with permissions.

...

Parameter name

Type

Required

Description

sourcePageId

stringYesThe ID of the selected page to clone.
targetPageIdstringYesThe ID of the target parent page. If the page is at the root level (top level) the parent page should be the spaces home page.
titlePrefixstringYesThe page name prefix to add to avoid conflicts.
copyPermissionsbooleanYesShould page permissions be cloned, true/false.

Return type

boolean(true\/false)

Returns true if pages and permissions are cloned successfully.

Example

Example 1

Code Block
number targetPageId = 11003;
string titlePrefix = "Copy of ";
boolean copyPermissions = true;
return clonePageTree(sourcePageId, targetPageId, titlePrefix, copyPermissions);

...