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', {
  13.                         'slug': ancestor.slug,
  14.                         '_locale': ancestor.translation.locale,
  15.                         'products':'products'|trans,
  16.                         'product_category':'product_category'|trans
  17.                     }) }}" class="section">{{ ancestor.name }}</a>
  18.                 {% endif %}
  19.                 <div class="divider"> / </div>
  20.             {% endif %}
  21.         {% endfor %}
  22.         {% if taxon.enabled %}
  23.             <a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {
  24.                 'slug': taxon.slug,
  25.                 'products':'products'|trans,
  26.                 'product_category':'product_category'|trans,
  27.                 '_locale': taxon.translation.locale})
  28.             }}" class="section">{{ taxon.name }}</a>
  29.         {% else %}
  30.             <div class="section">{{ taxon.name }}</div>
  31.         {% endif %}
  32.     {% endif %}
  33. </div>