Skip to content

Kirby 4.5.0

page.render:before

/site/config/config.php
return [
    'hooks' => [
        'page.render:before' => function (string $contentType, array $data, Kirby\Cms\Page $page) {
            // your code goes here
            return $data;
        }
    ]
]

Parameters

Parameter Type
$contentType string
$data array
$page Kirby\Cms\Page