{% load wagtailcore_tags %}
{% if ancestors %}
<div class="breadcrumbs">
  <ul class="breadcrumbs-list">
    {% for ancestor in ancestors %}
      <li class="breadcrumbs-list__item">
        {% if forloop.last %}
          <p class="breadcrumbs-list__current">{{ ancestor }}</p>
        {% else %}
          <a href="{% pageurl ancestor.specific %}" class="breadcrumbs-list__anchor">
            {{ ancestor }}
          </a>
        {% endif %}
      </li>
    {% endfor %}
  </ul>
</div>
{% endif %}
