$site->children()

Returns a $pages collection with all first-level children in the content folder

  • return ($pages)
<nav class="main-menu" role="navigation">
  <ul>
    <?php foreach($site->children()->visible() as $item): ?>
    <li><a<?php e($item->isOpen(), ' class="active"') ?> href="<?= $item->url() ?>"><?= html($item->title()) ?></a></li>
    <?php endforeach ?>
  </ul>
</nav>

Is something missing or incorrect? Edit this page on Github…