templates/navigations/partials/breadcrumb.html.twig line 1

Open in your IDE?
  1. {% set breadcrumb = elements_breadcrumb( pages )|default([]) %}
  2. {% if breadcrumb is not empty %}
  3.     {% set lastItem = (breadcrumb|length) - 1 %}
  4.     {% for index,item in breadcrumb %}
  5.         {% if index == lastItem %}
  6.             <li class="breadcrumb-item"><a><span>{{ item['label'] }}</span></a></li>
  7.         {% else %}
  8.             <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
  9.                 <a itemprop="item" href="{{ item['uri'] }}" target="{{ item['target'] }}">
  10.                     <span itemprop="name">{{ item['label'] }}</span>
  11.                 </a>
  12.                 <meta itemprop="position" content="{{ loop.index0 }}">
  13.             </li>
  14.         {% endif %}
  15.     {% endfor %}
  16. {% endif %}