templates/content/homepage.html.twig line 1

Open in your IDE?
  1. {% extends base_layout() %}
  2. {% block content %}
  3.     <div class="container">
  4.         <div class="row">
  5.             <div class="col-12">
  6.                 {{ pimcore_areablock('content_top') }}
  7.             </div>
  8.         </div>
  9.     </div>
  10.     {% if productsGroups is defined %}
  11.         <section class="mb-5">
  12.             <div class="container">
  13.                 <div class="row row-cols-2 row-cols-lg-5 g-5 d-flex justify-content-center">
  14.                     {% for productsGroup in productsGroups %}
  15.                         {% if loop.index <= 10 %}
  16.                             {% set detailLink = app_product_grouplink(productsGroup) %}
  17.                             <div class="col">
  18.                                 <div class="text-center catoverview">
  19.                                     <a href="{{ detailLink }}" class="fs-5" onMouseOver="this.style.color='{{ productsGroup.bgcolor }}'" onMouseOut="this.style.color='#595959'">
  20.                                         <div class="p-3 position-relative h-100 d-block">
  21.                                             {% set productimage = productsGroup.image %}
  22.                                             {% if productimage %}
  23.                                                 <img src="{{ productimage.getThumbnail('homepage-icon') }}" class="img-fluid d-block" style="z-index: 1">
  24.                                             {% endif %}
  25.                                             {% set productimagebg = productsGroup.imagebg %}
  26.                                             {% if productimagebg %}
  27.                                                 <img src="{{ productimagebg.getThumbnail('homepage-icon') }}" class="img-fluid position-absolute top-0 start-0 d-block bg-shape"  style="z-index: -1">
  28.                                             {% endif %}
  29.                                         </div>
  30.                                         {% if productsGroup.combinedCategoryName is not empty %}
  31.                                             {{ productsGroup.combinedCategoryName|capitalize }}
  32.                                         {% else %}
  33.                                             {{ productsGroup.oms|capitalize }}
  34.                                         {% endif %}
  35.                                     </a>
  36.                                 </div>
  37.                             </div>
  38.                         {% endif %}
  39.                     {% endfor %}
  40.                     <div class="accordion col-12 w-100 accordion-flush homeaccordion" id="accordionExample">
  41.                         <div class="accordion-item">
  42.                             <div id="collapseOne" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
  43.                                 <div class="row row-cols-2 row-cols-lg-5 g-5 mb-5 d-flex justify-content-center">
  44.                                     {% for productsGroup in productsGroups %}
  45.                                         {% if loop.index > 10 %}
  46.                                             {% set detailLink = app_product_grouplink(productsGroup) %}
  47.                                             <div class="col">
  48.                                                 <div class="text-center catoverview">
  49.                                                     <a href="{{ detailLink }}" class="fs-5" onMouseOver="this.style.color='{{ productsGroup.bgcolor }}'" onMouseOut="this.style.color='#595959'">
  50.                                                         <div class="p-3 position-relative h-100 d-block">
  51.                                                             {% set productimage = productsGroup.image %}
  52.                                                             {% if productimage %}
  53.                                                                 <img src="{{ productimage.getThumbnail('homepage-icon') }}" class="img-fluid d-block" style="z-index: 1">
  54.                                                             {% endif %}
  55.                                                             {% set productimagebg = productsGroup.imagebg %}
  56.                                                             {% if productimagebg %}
  57.                                                                 <img src="{{ productimagebg.getThumbnail('homepage-icon') }}" class="img-fluid position-absolute top-0 start-0 d-block bg-shape" style="z-index: -1">
  58.                                                             {% endif %}
  59.                                                         </div>
  60.                                                         {{ productsGroup.oms|capitalize }}
  61.                                                     </a>
  62.                                                 </div>
  63.                                             </div>
  64.                                         {% endif %}
  65.                                     {% endfor %}
  66.                                 </div>
  67.                             </div>
  68.                             <div class="text-center" id="headingOne">
  69.                                 <button class="accordion-button mx-auto collapsed text-red" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
  70.                                     {{ 'Alle categorieëen'|trans }}
  71.                                 </button>
  72.                             </div>
  73.                         </div>
  74.                     </div>
  75.                 </div>
  76.             </div>
  77.         </section>
  78.     {% endif %}
  79.     {% if productPromotion is defined %}
  80.         <section class="homepromoties mb-5">
  81.             <div class="container py-5">
  82.                 <div class="row">
  83.                     <div class="col-12 mb-3">
  84.                         <h2 class="text-red display-5 text-center mb-5">
  85.                             <span class="heading-line red">{{ 'Promoties'|trans }}</span>
  86.                         </h2>
  87.                     </div>
  88.                     <div class="splide" id="promosplide">
  89.                         <div class="splide__track">
  90.                             <ul class="splide__list pb-5">
  91.                                 {% for productPromotion in productPromotion %}
  92.                                     {% set categoryProduct = app_product_getCategory(productPromotion.parent) %}
  93.                                     {% set subcategoryProduct = productPromotion.parent %}
  94.                                     {% set detailLink = app_product_articlelink(categoryProduct,subcategoryProduct,productPromotion) %}
  95.                                     <li class="splide__slide">
  96.                                         <div class="promo position-relative">
  97.                                             <a href="{{ detailLink }}">
  98.                                                 {% set productPromotionImage = productPromotion.fotos %}
  99.                                                 {% if productPromotionImage %}
  100.                                                     <div class="p-3">
  101.                                                         <img src="{{ productPromotionImage.getThumbnail('homepage-catoverview') }}" class="img-fluid">
  102.                                                     </div>
  103.                                                 {% endif %}
  104.                                                 {#{{ productPromotion.fotos }}#}
  105.                                                 <strong>{{ productPromotion.oms }}</strong>
  106.                                             </a>
  107.                                             {% if productPromotion.promoprijs is defined %}
  108.                                                 {% if productPromotion.promoprijs > 0 %}
  109.                                                     <div class="promoprijs">
  110.                                                         <div class="d-inline-block">
  111.                                                             <strike>€ {{ productPromotion.prijs|number_format(2, ',', ' ') }}</strike><br>
  112.                                                             <span>€ {{ productPromotion.promoprijs|number_format(2, ',', ' ') }}</span>
  113.                                                         </div>
  114.                                                     </div>
  115.                                                 {% else %}
  116.                                                     <br>€ {{ productPromotion.prijs|number_format(2, ',', ' ') }}
  117.                                                 {% endif %}
  118.                                             {% endif %}
  119.                                         </div>
  120.                                     </li>
  121.                                 {% endfor %}
  122.                             </ul>
  123.                         </div>
  124.                     </div>
  125.                 </div>
  126.             </div>
  127.         </section>
  128.     {% endif %}
  129.     {#
  130.     {% if overons is defined %}
  131.         <section>
  132.             <div class="container">
  133.                 <div class="row">
  134.                     <div class="col-12">
  135.                         <h2>{{ 'In de kijker'|trans }}</h2>
  136.                     </div>
  137.                 </div>
  138.                 <div class="row">
  139.                     {% for overonsPage in overons %}
  140.                         <div class="col-4">
  141.                             <a href="{{ overonsPage.fullpath }}"><h2>{{ overonsPage.title }}</h2></a>
  142.                         </div>
  143.                     {% endfor %}
  144.                 </div>
  145.             </div>
  146.         </section>
  147.     {% endif %}#}
  148.     {% if editmode %}
  149.         <div class="container">
  150.             <div class="row">
  151.                 <div class="col-12">
  152.                     <p class="advice">{{ 'tip: Door op het plusteken te klikken kun je kiezen welke inhoudelijke blok je kan toevoegen.'|trans({}, 'admin') }}</p>
  153.                 </div>
  154.             </div>
  155.         </div>
  156.     {% endif %}
  157.     <div class="container">
  158.         <div class="row">
  159.             <div class="col-12">
  160.                 {{ include('includes/default-content.html.twig') }}
  161.             </div>
  162.         </div>
  163.     </div>
  164.     {% if news is defined %}
  165.         <section class="homenews">
  166.             <div class="container py-5">
  167.                 <div class="row">
  168.                     <div class="col-12 mb-3 position-relative">
  169.                         <h2 class="text-primary display-5 text-center mb-5">
  170.                             <span class="heading-line primary">{{ 'Nieuws'|trans }}</span></h2>
  171.                         <div class="position-absolute top-0 end-0 d-flex align-items-center h-100 pb-5">
  172.                             <a href="{% if check_websitesetting('news_document', 'document') %}{{ inotherlang('LocalizedDocument', pimcore_website_config('news_document')) }}{% endif %}" class="text-secondary btn-more">
  173.                                 <span class="float-start">{{ 'Alle nieuws'|trans() }}</span>
  174.                                 <span class="material-symbols-rounded ms-2 pb-1 float-start">arrow_forward</span>
  175.                             </a>
  176.                         </div>
  177.                     </div>
  178.                 </div>
  179.                 <div class="row row-cols-lg-3 gy-3 gy-lg-0">
  180.                     {{ include('includes/news/detail.html.twig', {
  181.                         'news': news
  182.                     }) }}
  183.                 </div>
  184.             </div>
  185.         </section>
  186.     {% endif %}
  187. {% endblock %}