# $productPage->changeTemplate()

> Changes the page template

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

```php
$productPage->changeTemplate(string $template): Kirby\Cms\Page
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$template` | `string` | `–` |

## Return type

`Kirby\Cms\Page`

## Exceptions

| Type | Description |
| --- | --- |
| `LogicException` | If the textfile cannot be renamed/moved |

## Parent class

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