templates/frontend/product/index.html.twig line 1

Open in your IDE?
  1. {% extends 'frontend/base.html.twig' %}
  2. {% from 'frontend/partials/_realizations.html.twig' import realization_slider %}
  3. {% block metaTitle %}{{ product.metaTitle|default(product.name) }}{% endblock %}
  4. {% block metaDescription %}{{ product.metaDescription|default(product.introduction|block_editor_render|striptags|html_entity_decode|slice(0, 200)) }}{% endblock %}
  5. {% block body %}
  6.     {% include 'frontend/partials/_breadcrumb.html.twig' %}
  7.     <section class="space-1">
  8.         <div class="container">
  9.             <h5 class="h4 mb-4 fw-medium">
  10.                 {% trans %}Sei nell’area{% endtrans%} {{ product.name|lower }}.
  11.                 {% trans %}Scorrendo la pagina troverai informazioni, cataloghi e promozioni che ti aiuteranno nella scelta del prodotto giusto per le tue esigenze.{% endtrans%}
  12.             </h5>
  13.             <div class="position-relative mb-4">
  14.                 <div class="d-lg-none">
  15.                     <figure class="media equal-1-1">
  16.                         <span style="background-image: url('{{ product.cover.publicUrl }}')"></span>
  17.                     </figure>
  18.                 </div>
  19.                 <div class="d-none d-lg-block">
  20.                     <figure class="media equal-2-1">
  21.                         <span style="background-image: url('{{ product.cover.publicUrl }}')"></span>
  22.                     </figure>
  23.                 </div>
  24.             </div>
  25.         </div>
  26.     </section>
  27.     <section class="space-1">
  28.         <div class="container">
  29.             {{ product.introduction|block_editor_render }}
  30.         </div>
  31.     </section>
  32.     {{ realization_slider(product.realizations) }}
  33.     <section class="space-2">
  34.         <div class="container">
  35.             {% for section in product.sections %}
  36.             <div class="row align-items-center justify-content-center space-top-1 space-top-lg-2 space-bottom-lg-1">
  37.                 <div class="col-lg-5 ps-lg-5 {{ loop.index % 2 == 0 ? 'order-lg-1' }}">
  38.                     <h3 class="text-uppercase text-primary display-5 fw-bold mb-2 mb-lg-4" style="line-height: 1">
  39.                         {{ section.custom ? section.title : section.page.name }}
  40.                     </h3>
  41.                     <p class="fs-lg">
  42.                         {{ section.custom ? section.description : section.page.introduction }}
  43.                     </p>
  44.                     <a href="{{ section.custom ? section.link : path('frontend_product_page_index', {product: section.page.product.slug, page: section.page.slug}) }}"
  45.                        class="btn btn-primary text-uppercase fw-bold mb-4 mb-lg-0"
  46.                        aria-label="{{ section.custom ? section.title : section.page.name }}"
  47.                     >{% trans %}Scopri di più{% endtrans %}</a>
  48.                 </div>
  49.                 <div class="col-lg-5 {{ loop.index % 2 == 0 ? 'order-lg-0' }}">
  50.                     <img src="{{ section.custom ? section.cover.publicUrl : section.page.cover.publicUrl }}" alt="{{ section.custom ? section.title : section.page.name }}"
  51.                          class="img-fluid">
  52.                 </div>
  53.             </div>
  54.             {% endfor %}
  55.         </div>
  56.     </section>
  57.     <section class="space-bottom-2">
  58.         <div class="container">
  59.             <div class="row justify-content-center">
  60.                 {% for productCallToAction in product.productCallToActions %}
  61.                     {% include 'frontend/partials/_call_to_action_card.html.twig' with {callToAction: productCallToAction.callToAction, size: productCallToAction.size} %}
  62.                 {% endfor %}
  63.             </div>
  64.         </div>
  65.     </section>
  66. {% endblock %}