templates/homepage-articles/evenementsavenir.html.twig line 1

Open in your IDE?
  1. {% set hits = get_evenements_a_venir() %}
  2. {% if hits|length > 0 %}
  3.     <div class="dflex fwwrap evenementsavenir-preview-container mt-40px">
  4.         <div class="splide-photo splide events" aria-label="En lien avec">
  5.             <div class="splide__arrows">
  6.                 <button class="splide__arrow splide__arrow--prev">
  7.                     {{ source('svg/left-arrow-icon.html.twig') }}
  8.                 </button>
  9.                 <button class="splide__arrow splide__arrow--next">
  10.                     {{ source('svg/right-arrow-icon.html.twig') }}
  11.                 </button>
  12.             </div>
  13.             <div class="splide__track">
  14.                 <ul class="splide__list mb-3p5em">
  15.                     {% for i, hit in hits %}
  16.                         {% set type = hit.template %}
  17.                         {% set url = sulu_content_path(hit.routePath) %}
  18.                         {% if hit.published is defined and hit.published is not empty %}
  19.                             {% set published = hit.published %}
  20.                         {% endif %}
  21.                         {% if hit.excerptCategories is defined and hit.excerptCategories|length > 0 %}
  22.                             {% set categories = hit.excerptCategories %}
  23.                         {% endif %}
  24.                         {% if hit.title is defined and hit.title is not empty %}
  25.                             {% set title = hit.title %}
  26.                         {% endif %}
  27.                         {% if hit.chapo is defined and hit.chapo is not empty %}
  28.                             {% set chapo = hit.chapo %}
  29.                         {% endif %}
  30.                         {% if hit.changed is defined and hit.changed is not empty %}
  31.                             {% set changed = hit.changed %}
  32.                         {% endif %}
  33.                         {% if hit.header_img is defined and hit.header_img is not empty %}
  34.                             {% set img = sulu_resolve_media(hit.header_img.id, 'fr') %}
  35.                         {% endif %}
  36.                         {% if hit.date is defined and hit.date is not empty %}
  37.                             {% set date = hit.date %}
  38.                         {% endif %}
  39.                         {% if hit.time is defined and hit.time is not empty %}
  40.                             {% set time = hit.time %}
  41.                         {% endif %}
  42.                         {% if hit.price is defined and hit.price is not empty %}
  43.                             {% set price = hit.price %}
  44.                         {% endif %}
  45.                         {% if hit.event_type is defined and hit.event_type is not empty %}
  46.                             {% set event_type = hit.event_type %}
  47.                         {% endif %}
  48.                         {% if hit.chapo is defined and hit.chapo is not empty %}
  49.                             {% set chapo = hit.chapo %}
  50.                         {% endif %}
  51.                         {% set title_lines = "" %}
  52.                         {% if i > 0 %}
  53.                             {% set title_lines = "fourlines" %}
  54.                         {% endif %}
  55.                         <li class="splide__slide dflex jcc">
  56.                             <div class="preview-container agenda br8 dflex">
  57.                                 {% include "blocks/previews-from-controller/preview-agenda-logic.html.twig" %}
  58.                             </div>
  59.                         </li>
  60.                     {% endfor %}
  61.                 </ul>
  62.             </div>
  63.         </div>
  64.     </div>
  65.     <div class="bgblue pabsolute w100 evenement-css"></div>
  66. {% else %}
  67.     <span class="fw500 fs20 preview-h3 lh28">
  68.         Aucun évènements à venir prévus.
  69.     </span>
  70. {% endif %}