1
0
mirror of synced 2024-11-24 05:46:09 +03:00
select2/docs/plugins/breadcrumbs/templates/partials/breadcrumbs.html.twig
2019-09-11 04:02:16 -04:00

28 lines
1.1 KiB
Twig

{% set crumbs = breadcrumbs.get() %}
{% set breadcrumbs_config = config.plugins.breadcrumbs %}
{% set divider = breadcrumbs_config.icon_divider_classes %}
{% if crumbs|length > 1 or breadcrumbs_config.show_all %}
<div id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
{% if breadcrumbs_config.icon_home %}
<i class="{{ breadcrumbs_config.icon_home }}"></i>
{% endif %}
{% for crumb in crumbs %}
{% if not loop.last %}
{% if crumb.routable %}
<a href="{{ crumb.url }}" itemprop="url"><span itemprop="title">{{ crumb.menu }}</span></a>
{% else %}
<span itemprop="title">{{ crumb.menu }}</span>
{% endif %}
<i class="{{ divider }}"></i>
{% else %}
{% if breadcrumbs_config.link_trailing %}
<a href="{{ crumb.url }}" itemprop="url"><span itemprop="title">{{ crumb.menu }}</span></a>
{% else %}
<span itemprop="title">{{ crumb.menu }}</span>
{% endif %}
{% endif %}
{% endfor %}
</div>
{% endif %}