{% load history_tags %}

<nav class="breadcrumb-wrapper" aria-label="breadcrumb">
    <ol class="breadcrumb">
        <li class="breadcrumb-item">
            <a href="{{ homepage_url }}">Home</a>
        </li>
        {% with category=product.get_categories.first %}
        {% for c in category.get_ancestors_and_self %}
        <li class="breadcrumb-item">
            <a href="{{ c.get_absolute_url }}">{{ c.name }}</a>
        </li>
        {% endfor %}
        <li class="breadcrumb-item active" aria-current="page">
            {{ product.get_title }}
        </li>
        {% endwith %}
    </ol>
    {% get_back_button as backbutton %}
    {% if backbutton %}
    <a href="{{ backbutton.url }}" class="backbutton">
        <i class="fa fa-arrow-left"></i> {{ backbutton.title }}
    </a>
    {% endif %}
</nav>