Reference

$page->parent()

Returns the parent Page object

$page->parent(): Page|null

Return type

Page|null

Example

This page is a subpage of:

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

Source code

kirby/src/Cms/Page.php#L958