{% set breadcrumb = elements_breadcrumb( pages )|default([]) %}
{% if breadcrumb is not empty %}
{% set lastItem = (breadcrumb|length) - 1 %}
{% for index,item in breadcrumb %}
{% if index == lastItem %}
<li class="breadcrumb-item"><a><span>{{ item['label'] }}</span></a></li>
{% else %}
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="{{ item['uri'] }}" target="{{ item['target'] }}">
<span itemprop="name">{{ item['label'] }}</span>
</a>
<meta itemprop="position" content="{{ loop.index0 }}">
</li>
{% endif %}
{% endfor %}
{% endif %}