You are here

breadcrumb.html.twig in Drupal 10

Theme override for a breadcrumb trail.

Available variables:

  • breadcrumb: Breadcrumb trail items.

File

core/themes/stable/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 role="navigation" aria-labelledby="system-breadcrumb">
  12. <h2 id="system-breadcrumb" class="visually-hidden">{{ 'Breadcrumb'|t }}</h2>
  13. <ol>
  14. {% for item in breadcrumb %}
  15. <li>
  16. {% if item.url %}
  17. <a href="{{ item.url }}">{{ item.text }}</a>
  18. {% else %}
  19. {{ item.text }}
  20. {% endif %}
  21. </li>
  22. {% endfor %}
  23. </ol>
  24. </nav>
  25. {% endif %}