Skip to content

Kirby 5.0.4

$page->isErrorPage()

Checks if the page is the error page

$page->isErrorPage(): bool

Return type

bool

This method modifies the existing $page object it is applied to and returns it again.

Parent class

Kirby\Cms\Page

Examples

A custom css file for the error page

<?php if ($page->isErrorPage()): ?>
<?= css('assets/css/error.css') ?>
<?php endif ?>