---
title: "clonePage"
canonical: "https://support.appfire.com/space/PSCONF/15303015/clonePage"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | clonePage(pageId, parentId, title) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Clones the page and returns the id of the cloned page.

Clones the page and returns the id of the cloned page. Takes page id to clone, new parent page id and new page title (title is optional).

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | pageId | Number | Yes | The ID of the selected page to clone. |
> | parentId | Number | Yes | The ID of the parent page. If the page is at the root level (top level) the parent page should be the spaces home page. |
> | title | String | No | Title of the new page. If excluded the title will be taken from the original page. |

## Return Type

**Number**

The return value will be the ID of the duplicated page.

## Examples

### Example 1

Result: Page 11801 is duplicated.

```javascript
clonePage(11801, 11800);
//11801 represents the ID of the page that will be duplicated under page 11800.
```

### Example 2

Result: Page 11801 is duplicated and id given a tile of "Cloned Page".

```javascript
clonePage(11801 ,11800, "Cloned Page")
```

## See also

> Macro (contentbylabel)