templates/themes/theme/news/embedNewsOverview.html.twig line 1

Open in your IDE?
  1. <div class="container">
  2.     <div class="row">
  3.         {% for article in articles %}
  4.             <div class="md:col-6 col-12">
  5.                 <a class="block mb-12 img-hover" href="{{ generatePath( app.request, article.linkedPageId, {'news_slug' : article.slug } ) }}">
  6.                     <div class="article-img">
  7.                         <img class="max-w-full h-auto mb-8" src="{{ imageCache('/' ~ article.getFullImagePath, 'zoomCrop', 1040, 720) }}" width="670" height="464" alt="{{ article.title }}" loading="lazy" />
  8.                     </div>
  9.                     <p class="text-sm mb-0 text-secondary"><strong>{{ allowInlineEditor(article, 'subtitle')|raw }}</strong></p>
  10.                     <h3 class="capitalize text-dark mt-0 mb-0">{{ allowInlineEditor(article, 'title')|raw }}</h3>
  11.                     {% if article.publishDate %}
  12.                         <p class="text-sm text-dark mb-0">{{ article.publishDate|date('d F Y') }}</p>
  13.                     {% endif %}
  14.                 </a>
  15.             </div>
  16.         {% else %}
  17.             <div class="col-12">
  18.                 <p>No news found</p>
  19.             </div>
  20.         {% endfor %}
  21.     </div>
  22. </div>
  23. {{ knp_pagination_render(articles) }}