themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Taxon/_indexMenu.html.twig line 1

Open in your IDE?
  1. {% import "@SyliusShop/Common/Macro/icons.html.twig" as icons %}
  2. {% macro item(taxon, isChild) %}
  3.     {% import _self as macros %}
  4.         {% set showTaxon = true %}
  5.         {% if taxon.code == 'promotions' %}
  6.             {% if taxon|app_get_product_amount(sylius.localeCode, sylius.channel) == 0 %}
  7.                 {% set showTaxon = false %}
  8.             {% endif %}
  9.         {% endif %}
  10.         {% if showTaxon == true %}
  11.             <li>
  12.                 <a href="{{ path('monsieurbiz_sylius_search_taxon', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" title="{{taxon.name}}">{{taxon.name}}</a>
  13.             </li>
  14.         {% endif %} 
  15. {% endmacro %}
  16. {% import _self as macros %}
  17. {% if taxons|length > 0 %}
  18.     {% for taxon in taxons %}
  19.         {{ macros.item(taxon) }}
  20.     {% endfor %}
  21. {% endif %}