{% if page_ancestors|length > 2 %}
    <div class="govuk-breadcrumbs">
        <ol class="govuk-breadcrumbs__list">
            {% for ancestor_page in page_ancestors %}
                {% if not ancestor_page.is_root %}
                   {% if ancestor_page.depth > 2 %}
                        <li class="govuk-breadcrumbs__list-item">
                            <a class="govuk-breadcrumbs__link" href="{{ ancestor_page.url }}">{{ ancestor_page.title }}</a>
                        </li>
                   {% else %}
                        <li class="govuk-breadcrumbs__list-item">
                            <a class="govuk-breadcrumbs__link" href="/">Home</a>
                        </li>
                    {% endif %}
                {% endif %}
            {% endfor %}
            <li class="govuk-breadcrumbs__list-item">
                {{ current_page_title }}
            </li>
        </ol>
    </div>
{% endif %}
