{% load i18n %}

<li class="breadcrumb-item{% if category is None %} active" aria-current="page{% endif %}"><a href="/part/">{% trans "Parts" %}</a></li>
{% if category %}
{% for path_item in category.parentpath %}
<li class="breadcrumb-item"><a href="{% url 'category-detail' path_item.id %}">{{ path_item.name }}</a></li>
{% endfor %}
<li class="breadcrumb-item"><a href="{% url 'category-detail' category.id %}">{{ category.name }}</a></li>
{% endif %}
{% if part %}
<li class="breadcrumb-item" aria-current="page"><a href="{% url 'part-detail' part.id %}">{{ part.name }}</a></li>
{% endif %}
