Reference

Guide

$site->breadcrumb()

Builds a breadcrumb collection

$site->breadcrumb(): Kirby\Cms\Pages

Return type

Kirby\Cms\Pages

Example

<nav class="breadcrumb" aria-label="breadcrumb">
  <ol>
    <?php foreach($site->breadcrumb() as $crumb): ?>
    <li>
      <a href="<?= $crumb->blogurl() ?>" <?= e($crumb->isActive(), 'aria-current="page"') ?>>
        <?= html($crumb->title()) ?>
      </a>
    </li>
    <?php endforeach ?>
  </ol>
</nav>

Source code

kirby/src/Cms/Site.php#L204