file breadcrumb.html.twig

Default theme implementation for a breadcrumb trail.

Available variables:

  • breadcrumb: Breadcrumb trail items.
1 theme call to breadcrumb.html.twig
Breadcrumb::preprocessVariables in src/Plugin/Preprocess/Breadcrumb.php
Preprocess the variables array.
Source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a breadcrumb trail.
  5. *
  6. * Available variables:
  7. * - breadcrumb: Breadcrumb trail items.
  8. *
  9. * @ingroup templates
  10. */
  11. #}
  12. {% if breadcrumb %}
  13. <ol class="breadcrumb">
  14. {% for item in breadcrumb %}
  15. <li {{ item.attributes }}>
  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. {% endif %}

Related topics