$site->find($uri)

Finds a single $page object or a collection of $pages placed directly in /content by a single UID or a set of multiple UIDs.

  • $uri (args)
    The URI(s) of a subpage or multiple subpages
  • return ($page | $pages)

Example

Fetch a single subpage

<?= $site->find('subpage-a')->title() ?>

Fetch multiple subpages

<ul>
  <?php foreach($site->find('subpage-a', 'subpage-c', 'subpage-i') as $subpage): ?>
  <li>
    <a href="<?= $subpage->url() ?>">
      <?= html($subpage->title()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>