$page->parents()
Returns a list of all parents and their parents recursively
$page->parents(): Kirby\Cms\Pages
Return type
This method modifies the existing $page
object it is applied to and returns it again.
Parent class
Examples
$parents = $page->parents();
foreach($parents as $parent): ?>
<h1><?= $parent->title()->html() ?></h1>
<?php endforeach ?>