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.     {% if taxon.children|length > 0 %}
  5.         <div class="col-lg-3 col-md-4 col-6" {{ sylius_test_html_attribute('menu-item') }}>
  6.             <div class="categ-bit-index">
  7.                 <div class="image-categ-i">
  8.                     {% if taxon.images.first %}
  9.                             {% set path = taxon.images.first.path|imagine_filter(filter|default('sylius_admin_product_large_thumbnail')) %}
  10.                     {% else %}
  11.                         {% set path = '//placehold.it/200x200' %}
  12.                     {% endif %}
  13.                         <img src="{{ path }}" alt="{{ taxon.name }}" class="ui bordered image" />
  14.                 </div>
  15.                 <h2 class="title-categ-i"> {{ taxon.name }}</h2>
  16.                 <p>{{ taxon.description }}</p>
  17.                 <div class="content-btn-link">
  18.                     <a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="btn-link">Découvrir</a>
  19.                 </div>
  20.             </div>
  21.         </div>
  22.     {% else %}
  23.         <div class="col-lg-3 col-md-4 col-6">
  24.             <div class="categ-bit-index">
  25.                 <div class="image-categ-i">
  26.                     {% if taxon.images.first %}
  27.                             {% set path = taxon.images.first.path|imagine_filter(filter|default('sylius_admin_product_large_thumbnail')) %}
  28.                     {% else %}
  29.                         {% set path = '//placehold.it/200x200' %}
  30.                     {% endif %}
  31.                         <img src="{{ path }}" alt="{{ taxon.name }}" class="ui bordered image" />
  32.                 </div>
  33.                 <h3 class="title-categ-i"> {{ taxon.name }}</h3>
  34.                 <p>{{ taxon.description }}</p>
  35.                 <div class="content-btn-link">
  36.                     <a href="{{ path('sylius_shop_product_index', {'slug': taxon.slug, '_locale': taxon.translation.locale}) }}" class="btn-link">Découvrir</a>
  37.                 </div>
  38.             </div>
  39.         </div>
  40.     {% endif %}
  41. {% endmacro %}
  42. {% import _self as macros %}
  43. {% if taxons|length > 0 %}
  44.     {% for taxon in taxons %}
  45.         {{ macros.item(taxon) }}
  46.     {% endfor %}
  47. {% endif %}