templates/snippets/last-news.html.twig line 1

Open in your IDE?
  1. {% extends "layout-snippets.html.twig" %}
  2. {% block snippets %}
  3. <div class="apk-snippet-news uk-position-relative">
  4.     <div class="uk-container apk-container-1400">
  5.         {% if lastnew|length == 0 %}
  6.             <div class="uk-margin-medium-top uk-text-center">
  7.                 {{ "Aucune article n'est disponible"|trans }}
  8.             </div>
  9.         {% endif %}
  10.         <div uk-grid>
  11.             <div class="uk-width-1-2@m">
  12.                 <div class="uk-position-relative apk-video">
  13.                     <div class="aspect-ratio">
  14.                         {{ pimcore_video('content-video') }}
  15.                     </div>
  16.                 </div>
  17.             </div>
  18.         
  19.             <div class="uk-width-1-2@m">
  20.                 <h2>{{ pimcore_textarea("content-title",{"nl2br" : true}) }}</h2>
  21.                 {% for new in lastnew %}
  22.                     {% if new.Slug %}
  23.                         {% set link = path('newsDetail', {'slug': new.Slug, 'id': new.id}) %}
  24.                     {% else %}
  25.                         {% set link = false %}
  26.                     {% endif %}
  27.                     
  28.                     <div uk-grid>
  29.                         
  30.                         <div class="uk-width-1-3@m">
  31.                             <div class="uk-cover-container uk-height-small" data-apk-href="{{ link }}">
  32.                                 {{ new.image.thumbnail('global-image').html({'imgAttributes' : {'uk-cover' : null}})|raw }}
  33.                             </div>
  34.                         </div>
  35.                         <div class="uk-width-2-3@m">
  36.                             <div class="apk-grid-content apk-list-news-content">
  37.                                 <h4 class="uk-margin-remove-top uk-margin-remove-bottom">{{ (new.titre|nl2br)|raw }}</h4>
  38.                                 <h5 class="uk-margin-small-top uk-margin-small-bottom">{{ new.date|date('d-m-Y') }}</h5>
  39.                                 <p class="uk-margin-remove-top uk-margin-remove-bottom">{{ (new.courte_desc|nl2br)|raw }}</p>
  40.                                 <br>
  41.                             </div>
  42.                         </div>
  43.                     </div>
  44.                 {% endfor %}
  45.                 <div class="apk-global-link">
  46.                     {{ pimcore_link("global-btn") }}
  47.                 </div>
  48.             </div>
  49.         </div>
  50.         
  51.     </div>
  52. </div>
  53. {% endblock %}