templates/bundles/SyliusShopBundle/Taxon/_horizontalMenu.html.twig line 1

Open in your IDE?
  1. {% macro item(taxon) %}
  2. {% import _self as macros %}
  3. {% if taxon.children|length > 0 %}
  4. <div class="ui dropdown item">
  5. <span class="text">{{ taxon.name }}</span>
  6. <i class="dropdown icon"></i>
  7. <div class="menu">
  8. {% for childTaxon in taxon.children %}
  9. {{ macros.item(childTaxon) }}
  10. {% endfor %}
  11. </div>
  12. </div>
  13. {% else %}
  14. <a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="item">{{ taxon.name }}</a>
  15. {% endif %}
  16. {% endmacro %}
  17. {% import _self as macros %}
  18. {% if taxons|length > 0 %}
  19. <div class="ui large stackable menu">
  20. {% for taxon in taxons %}
  21. {{ macros.item(taxon) }}
  22. {% endfor %}
  23. </div>
  24. {% endif %}