Show breadcrumb with structural links to parts list.

This commit is contained in:
Jan Böhmer 2019-09-08 16:29:56 +02:00
parent 429a4ebd17
commit 73f8ee36a5
2 changed files with 21 additions and 1 deletions

View file

@ -92,4 +92,20 @@
{% else %}
-
{% endif %}
{% endmacro %}
{% macro breadcrumb_entity_link(entity, link_type = "list_parts") %}
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
{% for e in entity.pathArray %}
<li class="breadcrumb-item {% if loop.last %}active{% endif %}">
{% if link_type is not empty and not loop.last %}
<a href="{{ e | entityURL(link_type) }}">{{ e.name }}</a>
{% else %}
{{ e.name }}
{% endif %}
</li>
{% endfor %}
</ol>
</nav>
{% endmacro %}