$page->render()
Renders the page with the given data.
$page->render(array $data = [ ], string $contentType = 'html', Kirby\Content\VersionId|string|null $versionId = null): string
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $data | array |
[ ]
|
|
| $contentType | string |
'html'
|
|
| $versionId | Kirby\Content\VersionIdorstringornull |
null
|
Optional override for the auto-detected version to render |
Return type
string
This method modifies the existing $page object it is applied to and returns it again.
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\NotFoundException |
If the default template cannot be found |