templates/front/products.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block body %}
  3.     {% include "front/menuBg.html.twig" with {'menu':getCategoryMenu(categoryActive, subCategoryActive, subSubCategoryActive, subSubSubCategoryActive)} %}
  4.     <div class="container">
  5.         {% if not value %}
  6.             <h1 class="title may-30">
  7.                 {{ value ? value.title : "products.h1"|trans|raw }}
  8.             </h1>
  9.         {% endif %}
  10.         {% if value %}
  11.             {% include "front/catBg.html.twig" with {'bgImg':getCategoryImage(value, false, true, true)|imagine_filter('large'), "icon":getCategoryImage(value, true, true), "title":value.title, "color":getValueColor(value)} %}
  12.         {% endif %}
  13.         <div class="js-prods-list">
  14.             <div class="row">
  15.                 <div class="col-sm-6">
  16.                     {% include "form/productsFilterForm.html.twig" %}
  17.                 </div>
  18.                 <div class="col-sm-6 d-flex justify-content-end">
  19.                     {% set baseUrl = catalogPath ? path('front_catalog', {'path': catalogPath}) : path('front_products') %}
  20.                     <a class="pay-10 pax-15 jvzifb {{ not listView ? "active" }}"
  21.                        href="{{ baseUrl }}">
  22.                         <img src="{{ asset('assets/img/procol.svg') }}" alt="DMD Inox"
  23.                              class="w-auto mahep-100"/>
  24.                     </a>
  25.                     <a class="pay-10 pax-15 jvzifb {{ listView ? "active" }}"
  26.                        href="{{ baseUrl ~ '?listView=1' }}">
  27.                         <img src="{{ asset('assets/img/prodlist.svg') }}" alt="DMD Inox"
  28.                              class="w-auto mahep-100"/>
  29.                     </a>
  30.                 </div>
  31.             </div>
  32.             <div class="products row mat-30">
  33.                 {% for key, product in products %}
  34.                     <div class="col-lg-{{ listView ? "12" : "3 col-md-4 col-sm-6" }} mab-50">
  35.                         <div class="mimfqe">
  36.                             {% include (listView ? "front/productDetailList.html.twig" : "front/productDetail.html.twig") with {"intro":product.intro} %}
  37.                         </div>
  38.                     </div>
  39.                 {% endfor %}
  40.             </div>
  41.             {% if products|length == limit %}
  42.                 <div class="text-center mab-30">
  43.                     <button class="btn btn2 loadMoreProducts">
  44.                         <i class="fa fa-refresh mar-5"></i>
  45.                         {{ "products.load_more.btn"|trans|raw }}
  46.                     </button>
  47.                 </div>
  48.             {% endif %}
  49.         </div>
  50.         {% if (value.paragraphTitle is defined and value.paragraphTitle) and (value.description is defined and value.description) %}
  51.             <h2 class="title may-16">{{ value.paragraphTitle }}</h2>
  52.         {% elseif value.title is defined and (value.description is defined and value.description) %}
  53.             <h2 class="title may-16">{{ value.title }}</h2>
  54.         {% endif %}
  55.         {% if value.description is defined %}
  56.             <div class="content may-24">
  57.                 {{ value.description|raw }}
  58.             </div>
  59.         {% endif %}
  60.         {% if value is not null and value.galleryItems is defined and value.galleryItems|length > 0 %}
  61.             <div class="position-relative may-40 slid-outer-wrap">
  62.                 {% set hideGalleryNav = (value.galleryItems|length <= 3) %}
  63.                 {% include "front/slid-nav.html.twig" with {"hide": hideGalleryNav, "sliderClass": "gallery-cat-slid"} %}
  64.                 <div class="gallery-cat-slid">
  65.                     {% for item in value.galleryItems %}
  66.                         {% if item.galleryItemFileName %}
  67.                             <div class="gallery-cat-item px-2">
  68.                                 <div class="gallery-cat-img-wrapper">
  69.                                     <img src="{{ asset(vich_uploader_asset(item, 'galleryItemFile'))|imagine_filter('medium') }}"
  70.                                          alt="{{ item.title ?: item.galleryItemFileName }}"
  71.                                          class="w-100"/>
  72.                                 </div>
  73.                             </div>
  74.                         {% endif %}
  75.                     {% endfor %}
  76.                 </div>
  77.                 {% include "front/slid-nav.html.twig" with {"isRight": 1, "hide": hideGalleryNav, "sliderClass": "gallery-cat-slid"} %}
  78.             </div>
  79.         {% endif %}
  80.         {% if value is not null and value.pdfFileName is defined and value.pdfFileName %}
  81.             <div class="mat-40 mab-10">
  82.                 <a href="{{ asset(vich_uploader_asset(value, 'pdfFile')) }}" target="_blank" class="btn-pdf-download">
  83.                     <i class="fa fa-file-pdf mar-8"></i>
  84.                     Télécharger la documentation
  85.                 </a>
  86.             </div>
  87.         {% endif %}
  88.     </div>
  89. {% endblock %}