# $productPage->duplicate()

> Duplicates the page with the given slug and optionally copies all files

- Source: `src/Cms/PageActions.php#L709` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Cms/PageActions.php#L709>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$productPage->duplicate(null|string $slug = null, array $options = []): Kirby\Cms\Page
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$slug` | `null\|string` | `null` |
| `$options` | `array` | `[]` |

## Return type

`Kirby\Cms\Page`

## Parent class

`Wagnerwagner\Merx\ProductPage` inherited from `Kirby\Cms\Page`
