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.getEnabledChildren|length > 0 %}
  4.         <li class="{% if not isChild -%}navItem{% endif %} {% if app.request.query.get('slugTaxon') == ('/cat-' ~ taxon.translation.slug ~ '.html') or app.request.query.get('slugTaxon') ==  ('/cat-' ~ taxon.translation.slug ~ '.htm') %}active {% endif %}" {{ sylius_test_html_attribute('menu-item') }} id="categ-{{taxon.id}}">
  5.             <a class="navLink d-flex align-items-center" href="{{ path('monsieurbiz_sylius_search_taxon', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}"  title="{{ taxon.name }}">
  6.                  {% if taxon.getImagesByType('icon_menu')|length > 0 %}
  7.                     {% set path = taxon.getImagesByType('icon_menu')[1].path|imagine_filter(filter|default('app_shop_taxon_icon')) %}
  8.                 {% else %}
  9.                     {% set path = asset('images/ico_categ1.svg')%}
  10.                 {% endif %}
  11.                 <strong>
  12.                     <img src="{{path}}" class="{{ taxon.name }}">
  13.                 </strong>
  14.                <span class="pl-2"> {{ taxon.name }}
  15.                    <i class="icon-down-open-big"></i>
  16.                </span>
  17.             </a>
  18.             {% set openMenu = false %}
  19.             {% if app.request.query.get('slugTaxon') == ('/cat-' ~ taxon.translation.slug ~ '.html') or app.request.query.get('slugTaxon') ==  ('/cat-' ~ taxon.translation.slug ~ '.htm') %}
  20.                 {% set openMenu = true %}
  21.             {% else %}
  22.                 {% for childTaxon in taxon.getEnabledChildren %}
  23.                     {% if app.request.query.get('slugTaxon') == ('/cat-' ~ childTaxon.translation.slug ~ '.htm') %}
  24.                         {% set openMenu = true %}
  25.                     {% endif %}
  26.                 {% endfor %}
  27.             {% endif %}
  28.             <div class="subMenu {% if openMenu %} open-menu{% endif %}">
  29.                 <div class="sub-menu-top">
  30.                     <div class="container">
  31.                         <div class="row align-items-center_">
  32.                             <div class="ss-categ-l">
  33.                                 <div class="flex-categ">
  34.                                     <div class="box-flex">
  35.                                         <div class="subBloc subBorder">
  36.                                             <div class="row">
  37.                                                 <div class="col-12">
  38.                                                     <ul class="sub-product">
  39.                                                         <li class="list-styled-none"><a href="{{ path('monsieurbiz_sylius_search_taxon', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="navLink d-flex align-items-center color-pink-s text-underline"><i class="icon-right-open"></i> {{'app.header.see_all_product'|trans}} </a></li>
  40.                                                        {% for childTaxon in taxon.getEnabledChildren %}
  41.                                                             <li id="sscateg_{{childTaxon.id}}" {% if app.request.query.get('slugTaxon') == (childTaxon.translation.slug ~ '.html') %}class="active"{% endif %}>
  42.                                                                 <a class="navLink d-flex align-items-center {% if app.request.query.get('slugTaxon') == ('/cat-' ~ childTaxon.translation.slug ~ '.htm') %} color-pink-s {% endif %}" href="{{ path('monsieurbiz_sylius_search_taxon', {'slug': childTaxon.slug, '_locale': childTaxon.translation.locale}) }} "  title="{{ childTaxon.name }}">{{ childTaxon.name }}</a>
  43.                                                             </li>
  44.                                                         {% endfor %}
  45.                                                     </ul>
  46.                                                 </div>
  47.                                             </div>
  48.                                         </div>
  49.                                     </div>
  50.                                 </div>
  51.                             </div>
  52.                         </div>
  53.                     </div>
  54.                 </div>
  55.             </div>
  56.         </li>
  57.     {% else %}
  58.         <li class="navItem test3"  id="categ-{{taxon.id}}">
  59.             <a href="{{ path('monsieurbiz_sylius_search_taxon', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}"
  60.                class="navLink d-flex align-items-center  {% if not isChild -%}nav-item{% endif %}"
  61.                title="{{ taxon.name }}" {{ sylius_test_html_attribute('menu-item') }}>
  62.             {% if taxon.getImagesByType('icon_menu')|length > 0 %}
  63.                 {% set path = taxon.getImagesByType('icon_menu')[1].path|imagine_filter(filter|default('app_shop_taxon_icon')) %}
  64.             {% else %}
  65.                 {% set path = asset('images/ico_categ1.svg')%}
  66.             {% endif %}
  67.                 <strong>
  68.                     <img src="{{path}}" class="{{ taxon.name }}">
  69.                 </strong>
  70.                 <span class="pl-2">{{ taxon.name }}</span>
  71.             </a>
  72.         </li>
  73.     {% endif %}
  74. {% endmacro %}
  75. {% import _self as macros %}
  76. {% if taxons|length > 0 %}
  77.     <ul class="onglets " id="mainNavbar">
  78.         {% for taxon in taxons %}
  79.             {{ macros.item(taxon) }}
  80.         {% endfor %}
  81.         {#<li class="navItem"><a href="{{ path('app_shop_brand_index') }}" class="navLink color-red" title="{{ 'app.ui.brands'|trans }}">{{ 'app.ui.brands'|trans }}</a> </li>
  82.         <li class="navItem"><a href="{{ path('sylius_shop_product_index', {'slug': 'nouveautes'}) }}" class="navLink color-red" title="{{ 'app.ui.news'|trans }}">{{ 'app.ui.news'|trans }}</a> </li>
  83.         <li class="navItem"><a href="{{ path('sylius_shop_product_index', {'slug': 'promotions'}) }}" class="navLink color-red" title="{{ 'app.ui.promotions'|trans }}">{{ 'app.ui.promotions'|trans }}</a> </li>
  84.         <li class="navItem"><a href="{{ path('app_shop_partial_product_best_sellers_index') }}" class="navLink color-red" title="{{ 'app.ui.bestsellers'|trans }}">{{ 'app.ui.bestsellers'|trans }}</a> </li>
  85.         {% if app.user %}
  86.             <li class="navItem" >{% include '@BitBagSyliusWishlistPlugin/Header/_wishlistHeader.html.twig' %}</li>
  87.         {% endif %}#}
  88.     </ul>
  89. {% endif %}