$page->parents()

Returns a $pages collection of all parents

  • return ($pages)

Example

<?php
$parents = $page->parents();
foreach($parents as $parent): ?>
  <h1><?= $parent->title()->html()</h1>
<?php endforeach ?>