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 ancestor.isRoot() %}
  9. <div class="section">{{ ancestor.name }}</div>
  10. {% else %}
  11. <a href="{{ path('sylius_shop_product_index', {'slug': ancestor.slug, '_locale': ancestor.translation.locale}) }}" class="section">{{ ancestor.name }}</a>
  12. {% endif %}
  13. <div class="divider"> / </div>
  14. {% endfor %}
  15. <a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="section">{{ taxon.name }}</a>
  16. <div class="divider"> / </div>
  17. {% endif %}
  18. <div class="active section">{{ product.name }}</div>
  19. </div>