templates/bundles/SyliusShopBundle/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"> / </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 not ancestor.isRoot() %}
  9.                 {% if not ancestor.enabled %}
  10.                     <div class="section">{{ ancestor.name }}</div>
  11.                 {% else %}
  12.                     <a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': ancestor.slug, '_locale': ancestor.translation.locale}) }}" class="section">{{ ancestor.name }}</a>
  13.                 {% endif %}
  14.                 <div class="divider"> / </div>
  15.             {% endif %}
  16.         {% endfor %}
  17.         {% if taxon.enabled %}
  18.             <a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, 'products':'products'|trans, 'product_category':'product_category'|trans, '_locale': taxon.translation.locale}) }}" class="section">{{ taxon.name }}</a>
  19.         {% else %}
  20.             <div class="section">{{ taxon.name }}</div>
  21.         {% endif %}
  22.         <div class="divider"> / </div>
  23.     {% endif %}
  24.     <div class="active section">{{ product.name }}</div>
  25. </div>