$page->children()

Returns a $pages collection with all children of the page

  • return ($pages)

Example

<h2>Subpages</h2>
<ul>
  <?php foreach($page->children() as $subpage): ?>
  <li>
    <a href="<?php echo $subpage->url() ?>">
      <?php echo html($subpage->title()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>