Syntax
clonePageTree(sourcePageId, targetPageId, titlePrefix, copyPermissions)
Description
Clones the page tree with its permissions.Parameters
Parameter name | Type | Required | Description |
---|---|---|---|
| string | Yes | ID of the selected page to clone. |
targetPageId | string | Yes | 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. |
titlePrefix | string | Yes | The page name prefix to add to avoid conflicts. |
copyPermissions | boolean | Yes | Parameter to specify whether the page permissions should be cloned, true/false. |
Return type
boolean(true/false)
Returns true if pages and permissions are cloned successfully.
Example
number targetPageId = 11003; string titlePrefix = "Copy of "; boolean copyPermissions = true; return clonePageTree(sourcePageId, targetPageId, titlePrefix, copyPermissions);
See also