themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_breadcrumb.html.twig line 1

Open in your IDE?
  1. <nav>
  2.     <ol class="breadcrumb ariane-box m-0">
  3.         <li class="breadcrumb-item"><a href="{{ path('sylius_shop_homepage') }}">{{ 'sylius.ui.home'|trans }}</a></li>
  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() %}
  9.                     <li class="breadcrumb-item">{{ ancestor.name }}</li>
  10.                 {% else %}
  11.                     <li class="breadcrumb-item">
  12.                         <a href="{{ path('sylius_shop_product_index', {'slug': ancestor.slug, '_locale': ancestor.translation.locale}) }}">{{ ancestor.name }}</a>
  13.                     </li>
  14.                 {% endif %}
  15.             {% endfor %}
  16.             <li class="breadcrumb-item">
  17.                 <a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}">{{ taxon.name }}</a>
  18.             </li>
  19.         {% endif %}
  20.         <li class="breadcrumb-item active">{{ product.name }}</li>
  21.     </ol>
  22. </nav>