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

Open in your IDE?
  1. {% macro item(taxon, isChild) %}
  2.     {% import _self as macros %}
  3.     {% if taxon.children|length > 0 %}
  4.         <li class="{% if not isChild -%}navItem{% endif %}" {{ sylius_test_html_attribute('menu-item') }}>
  5.             <a class="navLink" href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" >
  6.                 {{ taxon.name }} <span>({{ taxon|app_get_product_amount(sylius.localeCode, sylius.channel ) }})</span>
  7.             </a>
  8.             <div class="subMenu" style="display: none;">  
  9.                 <div class="sub-menu-top">
  10.                     <div class="container">
  11.                         <div class="row align-items-center">
  12.                             <div class="ss-categ-l">
  13.                                 <div class="flex-categ">
  14.                                     <div class="box-flex">
  15.                                         <div class="subBloc subBorder">
  16.                                             <div class="sub-lib"><span> {{ taxon.name }} </span><a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}">{{'app.header.voir_tout'|trans}}</a></div>
  17.                                             <div class="descr-categ-onglet descr-categ">
  18.                                                 <p>{{ taxon.description }}</p>
  19.                                             </div>
  20.                                             <div class="row">
  21.                                                 <div class="col-12">
  22.                                                     <ul class="sub-product">
  23.                                                         {% for childTaxon in taxon.children %}
  24.                                                             {{ macros.item(childTaxon, true) }}
  25.                                                         {% endfor %}
  26.                                                     </ul>
  27.                                                 </div>
  28.                                             </div>
  29.                                         </div>
  30.                                     </div>
  31.                                 </div>
  32.                             </div>
  33.                             <div class="s-categ-r">
  34.                                 <div class="r-ss-img pl-1 text-right">
  35.                                     <div class="img-ssm-bit">
  36.                                         {% if taxon.images.first %}
  37.                                             {% set path = taxon.images.first.path|imagine_filter(filter|default('sylius_admin_product_large_thumbnail')) %}
  38.                                         {% else %}
  39.                                             {% set path = '//placehold.it/200x200' %}
  40.                                         {% endif %}
  41.                                         <img src="{{ path }}" alt="{{ taxon.name }}" class="ui bordered image" />
  42.                                     </div>
  43.                                 </div>
  44.                             </div>
  45.                         </div>
  46.                     </div>
  47.                 </div>
  48.             </div>
  49.         </li>
  50.     {% else %}
  51.         <li class="navItem">
  52.             <a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}"
  53.                 class="navLink {% if not isChild -%}nav-item{% endif %}" {{ sylius_test_html_attribute('menu-item') }}>{{ taxon.name }} <span>({{ taxon|app_get_product_amount(sylius.localeCode, sylius.channel ) }})</span>
  54.             </a>
  55.         </li>
  56.     {% endif %}
  57. {% endmacro %}
  58. {% import _self as macros %}
  59. {% if taxons|length > 0 %}
  60.     <ul class="onglets" id="mainNavbar">
  61.         {% for taxon in taxons %}
  62.             {{ macros.item(taxon) }}
  63.         {% endfor %}
  64.         <li class="navItem"><a href="{{ path('app_shop_brand_index') }}" class="navLink " title="{{ 'app.ui.brands'|trans }}">{{ 'app.ui.brands'|trans }}</a> </li>
  65.         <li class="navItem visible-980">
  66.             <a href="#" class="navLink rech-link" > {{'sylius.ui.search' |trans}}</a>
  67.         </li>
  68.     </ul>
  69. {% endif %}