templates/Frontend/Events/_events_home.html.twig line 1

Open in your IDE?
  1. {% set selected_lang =  app.request.getLocale() %}
  2. {% if list_events is not empty %}
  3.     <div class="events_home">
  4.         <div class="container">
  5.             <div class="row">
  6.                 <div class="col-lg-1 col-md-12">
  7.                     <div class="titre_events_home">
  8.                         <h2>Events</h2>
  9.                     </div>
  10.                 </div>
  11.                 <div class="col-lg-11">
  12.                     <div class="row">
  13.                         {% for event in list_events %}
  14.                             <div class="col-lg-6 col-md-6">
  15.                                 <div class="item_events_home">
  16.                                     <a href="{{ path('event_selected',{'slug':event.slug}) }}" class="img_item_events_home">
  17.                                         <img class="img-fluid" src="{{ asset (vich_uploader_asset(event,'imageFile')) }}" alt="{{event}}">
  18.                                     </a>
  19.                                     <div class="text_item_events_home">
  20.                                         <label>
  21.                                             {% if event.datePublier is not empty and event.dateFinal is not empty %}
  22.                                                 {{event.datePublier|date('d')}} - {{event.dateFormat(selected_lang)}}
  23.                                             {% endif %}
  24.                                         </label>
  25.                                         <h3><a href="{{ path('event_selected',{'slug':event.slug}) }}">{{event}}</a></h3>
  26.                                         <span><img class="img-fluid" src="/assets/img/location.png" alt="">{{event.location}}</span>
  27.                                     </div>
  28.                                 </div>
  29.                             </div>
  30.                         {% endfor %}
  31.                     </div>
  32.                 </div>
  33.             </div>
  34.         </div>
  35.     </div>
  36.     
  37. {% endif %}