# $productPage->render()

> Renders the page with the given data.

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

```php
$productPage->render(array $data = [], $contentType = 'html', VersionId|string|null $versionId = null): string
```

## Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `$data` | `array` | `[]` |  |
| `$contentType` | `–` | `'html'` |  |
| `$versionId` | `VersionId\|string\|null` | `null` | Optional override for the auto-detected version to render |

## Return type

`string`

## Exceptions

| Type | Description |
| --- | --- |
| `NotFoundException` | If the default template cannot be found |

## Description

An optional content type can be passed to
render a content representation instead of
the default template.

## Parent class

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