{# Render breadcrumb path bar in Bootstrap 3 style.

These are used in the default admin interface, but you can use them on any traverse context.

See

* :py:mod:`websauna.system.core.breadcrumbs`

We also add Google SEO breadcrumbs metadata as per

* https://developers.google.com/search/docs/data-types/breadcrumbs

#}
{% if breadcrumbs %}
  <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
      {% for crumb in breadcrumbs %}
          <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
              <a itemscope itemprop="item" href={{ crumb.url }} itemtype="http://schema.org/Thing">
                  <span itemprop="name">
                    {{ crumb.name }}
                  </span>
              </a>

            <meta itemprop="position" content="{{ loop.index }}" />
          </li>
      {% endfor %}

      {% if view_name %}
        <li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
          <a itemscope itemprop="item" href={{ request.url }} itemtype="http://schema.org/Thing">
            <span itemprop="name">
              {{ view_name }}
            </span>
          </a>

          <meta itemprop="position" content="{{ breadcrumbs|length }}" />
        </li>
      {% endif %}
  </ol>
{% endif %}
