You are here

breadcrumb.html.twig in Drupal 10

Theme override for a breadcrumb trail.

Available variables:

  • breadcrumb: Breadcrumb trail items.

File

core/themes/olivero/templates/navigation/breadcrumb.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a breadcrumb trail.
  5. *
  6. * Available variables:
  7. * - breadcrumb: Breadcrumb trail items.
  8. */
  9. #}
  10. {% if breadcrumb %}
  11. <nav class="breadcrumb" role="navigation" aria-labelledby="system-breadcrumb">
  12. <h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
  13. <div class="breadcrumb__content">
  14. <ol class="breadcrumb__list">
  15. {% for item in breadcrumb %}
  16. <li class="breadcrumb__item">
  17. {% if item.url %}
  18. <a href="{{ item.url }}" class="breadcrumb__link">{{ item.text }}</a>
  19. {% else %}
  20. {{ item.text }}
  21. {% endif %}
  22. </li>
  23. {% endfor %}
  24. </ol>
  25. </div>
  26. </nav>
  27. {% endif %}