$page->copy()
Copies the page to a new parent
Parameters
Name | Type | Default |
---|---|---|
$options | array |
[ ] |
Return type
This method does not modify the existing $page
object but returns a new object with the changes applied. Learn more →
Exceptions
Type | Description |
---|---|
Kirby\Exception\DuplicateException |
If the page already exists |
Parent class
The $options
parameter
Name | Type |
---|---|
slug |
string |
isDraft |
bool |
num |
int |
children |
bool |
files |
bool |
Example
Passing no parent or passing null
as value for parent
will copy the page as child of $site
.