templates/web/components/prestations.html.twig line 1

Open in your IDE?
  1. <div class="row g-0 prestations-wrapper">
  2.     {% set data_article = [data.data[0], data.data[1], data.data[3], data.data[2]] %}
  3.     {% for item in data_article %}
  4.         <div class="col-md-4 prestation-image-wrap">
  5.             {% include '@web/components/picture.html.twig'
  6.                 with { 'mediaObject': item.primaryImage } %}
  7.         </div>
  8.         <div class="col-md-4 mb-5 mb-md-0 prestation-text-wrap">
  9.             {% if item.slug != 'csps' and item.slug != 'opc' %}
  10.             <a href="{{ path('web_prestation_show', {'slug': item.slug }) }}" class="prestation-text-wrap__link">
  11.                 <div class="prestation-text-wrap__head">
  12.                     <div class="icon-wrap" >
  13.                         {% include '@web/components/svg/' ~ item.icon ~ '.html.twig' %}
  14.                     </div>
  15.                     <h3 class="prestation-title">{{ item.headline }}</h3>
  16.                 </div>
  17.                 <div class="prestation-text-wrap__content">
  18.                     <p class="prestation-text">{{ item.articleResume }}</p>
  19.                     <p class="page-link-wrap mt-3">
  20.                         <span class="page-link-wrap__link">en savoir plus</span>
  21.                     </p>
  22.                 </div>
  23.             </a>
  24.             {% endif %}
  25.         </div>
  26.     {% endfor %}
  27. {# {{ dump(data|length) }} #}
  28.     {# Si le nombre d'item est pair on rajoute une image à la fin #}
  29.     {# {% if data|length % 2 == 0 %} #}
  30.         <div class="col-md-4 prestation-image-wrap">
  31.             <picture>
  32.                 <img src="{{ asset('assets/images/services-generique.jpg') }}" alt="Pilote Travaux Conseils">
  33.             </picture>
  34.         </div>
  35.     {# {% endif %} #}
  36. </div>