{% if breadcrumbs is defined and breadcrumbs is not empty %}
  <div class="breadcrumbs-container">
    <ol class="breadcrumbs">
      {#  <li class="breadcrumbs-item"><a href="/">{{ 'homepage_name'|aa_trans }}</a></li> #}
      {% for item in breadcrumbs %}
        {% set itemTag = 'a' %}
        {% if item.url|default() is empty %}
          {% set itemTag = 'span' %}
        {% endif %}
        {% set itemHtml %}{{ ('<' ~ itemTag
        ~ ' class="'
        ~ item.extra.css_classes|default() ~ '"'
        ~ (item.url|default() ? (' href="' ~ item.url ~ '"') : '') ~ '>'
        ~ item.label|default('item.label')
        ~ '</' ~ itemTag ~ '>'
        )|raw }}{% endset %}
        <li class="breadcrumb-item {% if loop.last %} active{% endif %}">{{ itemHtml }}</li>
      {% endfor %}
    </ol>
  </div>
{% endif %}