Skip to content

Kirby 4.5.0

$page->parent()

Returns the parent Page object

$page->parent(): Kirby\Cms\Page|null

Return type

Kirby\Cms\Page|null

Parent class

Kirby\Cms\Page

Example

This page is a subpage of:

<a href="<?= $page->parent()->url() ?>">
  <?= html($page->parent()->title()) ?>
</a>