Skip to content

Kirby 4.4.1

$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>