{% load wagtailcore_tags svg_tags %}

{% if ancestors %}
    <nav class="breadcrumb-container" aria-label="Breadcrumb">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <ol class="breadcrumb">
                        {% for ancestor in ancestors %}
                            {% if forloop.last %}
                                <li aria-current="page">{{ ancestor }}</li>
                            {% else %}
                                <li>
                                    <a href="{% pageurl ancestor %}">{% if forloop.first %}Home{% else %}{{ ancestor }}{% endif %}</a>
                                    {% svg_icon name="arrow-right" classname="" %}
                                </li>
                            {% endif %}
                        {% endfor %}
                    </ol>
                </div>
            </div>
        </div>
    </nav>
{% endif %}
