themes/BootstrapChildTheme/SyliusShopBundle/views/Product/Show/_breadcrumb.html.twig line 1

Open in your IDE?
  1. <div class="ui breadcrumb">
  2.     <a href="{{ path('sylius_shop_homepage') }}" class="section">{{ 'sylius.ui.home'|trans }}</a>
  3.     <div class="divider"> <i class="chevron right icon"></i> </div>
  4.     {% if product.mainTaxon is not null %}
  5.         {% set taxon = product.mainTaxon %}
  6.         {% set ancestors = taxon.ancestors|reverse %}
  7.         {% for ancestor in ancestors %}
  8.             {% if ancestor.isRoot()  or not ancestor.enabled %}
  9.                 <a class="section" href="{{ path('sylius_shop_product_index', {'slug': ancestor.slug}) }}">{{ ancestor.name }}</a>
  10.                 <div class="divider"> <i class="chevron right icon"></i> </div>
  11.             {% endif %}
  12.         {% endfor %}
  13.         {% if taxon.enabled and not taxon.isRoot %}
  14.             <a href="{{ path('sylius_shop_product_index', {'slug': taxon.root.slug,
  15.             'criteria': {'facets_filters' : {'catalogue-search' : {'cataloguefilter': [taxon.id]}}}}) }}" class="section">{{ taxon.name }}</a>
  16.             <div class="divider"> <i class="chevron right icon"></i> </div>
  17.         {% endif %}
  18.     {% endif %}
  19.     <div class="active section font-weight-bold">{{ product.name }}</div>
  20. </div>