Skip to content

Kirby 3.8.4

$site->breadcrumb()

Builds a breadcrumb collection

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

Return type

Kirby\Cms\Pages

Parent class

Kirby\Cms\Site

Example

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