templates/bundles/SyliusShopBundle/Taxon/verticalMenu.html.twig line 33

Open in your IDE?
  1. {% macro item(taxon) %}
  2.     {% import _self as macros %}
  3.     {% set children = taxon.getEnabledChildrenByTranslationName(taxon.translation.locale) %}
  4.     {% if children|length > 0 %}
  5.         <div class="accordion transition visible">
  6.             <div class="title">
  7.                 <a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="menu-title-link">
  8.                     {{ taxon.name }}
  9.                 </a>
  10.                 <img class="icon toggle-icon" src="{{ asset('build/shop/images/keyboard_arrow_down.svg', 'shop') }}" alt="Expand more">
  11.             </div>
  12.             <div class="content">
  13.                 {% for childTaxon in children %}
  14.                     {{ macros.item(childTaxon) }}
  15.                 {% endfor %}
  16.             </div>
  17.         </div>
  18.     {% else %}
  19.         <a href="{{ path('bitbag_sylius_elasticsearch_plugin_shop_list_products', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="accordion-link item font-bold">
  20.             {{ taxon.name }}
  21.         </a>
  22.     {% endif %}
  23. {% endmacro %}
  24. {% import _self as macros %}
  25. {% if taxons|length > 0 %}
  26.     {% for taxon in taxons %}
  27.         {{ macros.item(taxon) }}
  28.     {% endfor %}
  29.     {{ render(path('open_marketplace_shop_render_country_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/country.html.twig'})) }}
  30.     <a href="{{ path('open_marketplace_shop_vendor_index') }}" class="accordion-link item font-bold">{{ 'app.ui.brands'|trans }}</a>
  31.     {{ render(path('open_marketplace_shop_render_use_case_menu', {'template': '@SyliusShop/Layout/Sidebar/Menu/useCase.html.twig'})) }}
  32.     <a href="{{ path('sylius_shop_login') }}" class="accordion-link item font-bold" {% if is_granted('ROLE_USER') %} style="display: none;" {% endif %}>{{ 'app.ui.register_products'|trans }}</a>
  33. {% endif %}