templates/front/products.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% block metaTags %}
  3.     {% set title = siteTitle %}
  4.     {% set desc = siteTitle %}
  5.     {% if subCategoryActive %}
  6.         {% set title = subCategoryActive.metaTitle ?? (siteTitle ~ " - " ~ subCategoryActive.title) %}
  7.         {% set desc = subCategoryActive.metaDescription ?? (subCategoryActive.description) %}
  8.     {% elseif categoryActive %}
  9.         {% set title = categoryActive.metaTitle ?? (siteTitle ~ " - " ~ categoryActive.title) %}
  10.         {% set desc = categoryActive.metaDescription ?? (categoryActive.description) %}
  11.     {% endif %}
  12.     {% set desc = (subCategoryActive and subCategoryActive.metaDescription) ? subCategoryActive.metaDescription : (categoryActive and categoryActive.metaDescription) ? categoryActive.metaDescription : siteTitle %}
  13.     <meta name="description" content="{{ desc }}">
  14.     <title>{{ title }}</title>
  15.     <meta property="og:title" content="{{ title }}">
  16.     <meta property="og:description" content="{{ desc }}">
  17. {% endblock %}
  18. {% block body %}
  19.     {% if categoryActive.isChaine %}
  20.         {% if subCategoryActive %}
  21.             {% include "front/header.html.twig" with {
  22.                 'icon':(subCategoryActive.subCategoryFileName ? asset(vich_uploader_asset(subCategoryActive, 'subCategoryFile')) : null),
  23.                 "img":(subCategoryActive.subCategoryBgFileName ? asset(vich_uploader_asset(subCategoryActive, 'subCategoryBgFile')) : null),
  24.                 "title":subCategoryActive.title,
  25.                 "intro":subCategoryActive.intro,
  26.             } %}
  27.         {% endif %}
  28.     {% else %}
  29.         {% include "front/header.html.twig" with {
  30.             'icon':asset(vich_uploader_asset(categoryActive, 'categoryFile')),
  31.             "img":(categoryActive.categoryBgFileName ? asset(vich_uploader_asset(categoryActive, 'categoryBgFile')) : null),
  32.             "title":categoryActive.title,
  33.             "intro":categoryActive.intro,
  34.         } %}
  35.     {% endif %}
  36.     <section class="pat-30 position-relative">
  37.         <div class="container">
  38.             {% set menu = ((categoryActive.isChaine and subCategoryActive) ?
  39.                 {
  40.                     (categoryActive.title):"#",
  41.                     (subCategoryActive.title):"#",
  42.                 } :
  43.                 {
  44.                     (categoryActive.title):"#",
  45.                 }) %}
  46.             {% include "front/menu.html.twig" with {'menu':menu} %}
  47.         </div>
  48.         {% if categoryActive.isChaine %}
  49.             {% include "front/productsFooter.html.twig" with {
  50.                     'img':(subCategoryActive.subCategoryFileName ? asset(vich_uploader_asset(subCategoryActive, 'subCategoryFile')) : null),
  51.                     "title":subCategoryActive.title,
  52.                     "content":subCategoryActive.description,
  53.                 } %}
  54.         {% else %}
  55.             {% include "front/productsFooter.html.twig" with {
  56.                 'img':asset(vich_uploader_asset(categoryActive, 'categoryFile')),
  57.                 "title":categoryActive.title,
  58.                 "content":categoryActive.description,
  59.             } %}
  60.         {% endif %}
  61.         {% include "front/coordinates.html.twig" %}
  62.         <div class="container">
  63.             <div class="js-prods-list mat-0 mab-90">
  64.                 {% include "form/productsFilterForm.html.twig" %}
  65.                 <div class="products row justify-content-center-md">
  66.                     {% for key, product in products %}
  67.                         {% include "front/productListDetail.html.twig" %}
  68.                     {% endfor %}
  69.                 </div>
  70.                 {% if total > limit %}
  71.                     <div class="text-center">
  72.                         <div class="btn btn1 loadMoreProducts" data-limit="{{ limit }}">
  73.                             <div class="btn-text">
  74.                                 {#                            <i class="fa-solid fa-arrows-rotate mar-5"></i> #}
  75.                                 {{ "products.load_more.btn"|trans }}
  76.                             </div>
  77.                         </div>
  78.                     </div>
  79.                 {% endif %}
  80.             </div>
  81.         </div>
  82.     </section>
  83.     {% if categoryActive.isChaine %}
  84.         {% if subCategoryActive %}
  85.             <section class="position-relative pab-65">
  86.                 <div class="bgp-center otherCatProd bgs-cover w-100 position-absolute t-0 l-0 h-100 zi--1"
  87.                      style="background-image:url({{ asset('assets/img/procatbg.png')|imagine_filter('large') }})">
  88.                 </div>
  89.                 {% if otherSubCategories|length >= 1 and otherSubCategories|length <= 2 %}
  90.                     <div class="position-relative">
  91.                         <div class=" daorgy daorgy1 position-absolute t-0 l-0 h-100"></div>
  92.                         {% if otherSubCategories|length >= 2 %}
  93.                             <div class=" daorgy daorgy2 position-absolute t-0 r-0 h-100"></div>
  94.                         {% endif %}
  95.                         <div class="container">
  96.                             <div class="row">
  97.                                 {% for key, otherSubCategory in otherSubCategories %}
  98.                                     <div class="col-sm-6 mat-15 mat-0-sm c-white {{ key is even ? "par-30-sm" : "pal-30-sm" }}">
  99.                                         <div data-link
  100.                                              class="pointer pay-50 bgc-15683A otherCat otherChaineCat otherCat{{loop.index}} skew {{ key is even ? "par-100-md par-25" : "pal-100-md pal-25" }}">
  101.                                             <div class="row align-items-center position-relative skew-text {{ key is odd ? "flex-row-reverse" }}">
  102.                                                 <div data-aos="fade-up"   data-aos-duration="800" data-aos-delay="600" class="position-absolute  {{ key is odd ? "r-15" : 'l-15'}}">
  103.                                                     <i class="fa fa-arrow-{{ key is even ? "left" : "right" }}"></i>
  104.                                                 </div>
  105.                                                 <div class="col-sm-12 text-center animateText">
  106.                                                     <div class="uvflnd" data-aos="fade-up"   data-aos-duration="800">
  107.                                                         {% if otherSubCategory.subCategoryFileName %}
  108.                                                             <img src="{{ asset(vich_uploader_asset(otherSubCategory, 'subCategoryFile')) }}"
  109.                                                                  alt="{{ otherSubCategory.title }}" class="wi-50 img-white"/>
  110.                                                         {% endif %}
  111.                                                     </div>
  112.                                                     <h3 class="buhnsn mab-5 mat-0 noAmericana">
  113.                                                         <a data-aos="fade-up"   data-aos-duration="800" data-aos-delay="200" href="{{ path('front_products', {'catSlug':categoryActive.slug, "subCatSlug":otherSubCategory.slug}) }}"
  114.                                                            class="cofaes">
  115.                                                             {{ otherSubCategory.title }}
  116.                                                         </a>
  117.                                                     </h3>
  118.                                                     <div data-aos="fade-up"   data-aos-duration="800" data-aos-delay="400" class="ocgaes pmb0">
  119.                                                         {{ otherSubCategory.intro|raw }}
  120.                                                     </div>
  121.                                                 </div>
  122.                                             </div>
  123.                                         </div>
  124.                                     </div>
  125.                                 {% endfor %}
  126.                             </div>
  127.                         </div>
  128.                     </div>
  129.                 {% endif %}
  130.             </section>
  131.         {% endif %}
  132.     {% else %}
  133.         <section class="position-relative pab-65">
  134.             <div class="bgp-center bgs-cover w-100 position-absolute t-0 l-0 h-100 zi--1"
  135.                  style="background-image:url({{ asset('assets/img/procatbg.png')|imagine_filter('large') }})">
  136.             </div>
  137.             <div class="container">
  138.                 {% for key, otherCategory in otherCategories %}
  139.                     <div data-link
  140.                          class="pointer pay-50 bgc-15683A skew otherCat otherCatNoChaine cclmlw mx-auto c-white par-70-lg par-50-md par-40">
  141.                         <div class="row align-items-center skew-text position-relative">
  142.                             <div class="col-sm-12 text-center">
  143.                                 <div class="uvflnd" data-aos="fade-up"   data-aos-duration="800">
  144.                                     <img src="{{ asset(vich_uploader_asset(otherCategory, 'categoryFile')) }}"
  145.                                          alt="{{ otherCategory.title }}" class="wi-50 img-white" />
  146.                                 </div>
  147.                                 <h3 class="buhnsn mab-5 mat-15">
  148.                                     <a data-aos="fade-up"   data-aos-duration="800" data-aos-delay="200" href="{{ path('front_products', {'catSlug':otherCategory.slug}) }}"
  149.                                        class="cofaes">
  150.                                         {{ otherCategory.title }}
  151.                                     </a>
  152.                                 </h3>
  153.                                 <div class="ocgaes pmb0"  data-aos="fade-up"   data-aos-duration="800" data-aos-delay="400">
  154.                                     {{ otherCategory.listingIntro|raw }}
  155.                                 </div>
  156.                             </div>
  157.                             <div data-aos="fade-left"   data-aos-duration="800" data-aos-delay="600" class="position-absolute r-0 text-right">
  158.                                 <i class="fa fa-arrow-right"></i>
  159.                             </div>
  160.                         </div>
  161.                     </div>
  162.                 {% endfor %}
  163.             </div>
  164.         </section>
  165.     {% endif %}
  166. {% endblock %}