templates/news/listing.html.twig line 50

Open in your IDE?
  1. {% extends 'layouts/layout.html.twig' %}
  2. {% block content %}
  3.     <div id="main-content" class="main-content">
  4.         {% if document.getTitle() is empty %}
  5.             {% do pimcore_head_title(pimcore_input('headline').getData(), 'PREPEND') %}
  6.         {% endif %}
  7.         <div class="page-header">
  8.             <h1>{{ pimcore_input('headline', {'placeholder':'Headline'}) }}</h1>
  9.         </div>
  10.         {{
  11.             pimcore_areablock('content', {
  12.                 'allowed': [
  13.                     'headlines',
  14.                     'hero-teaser',
  15.                     'horizontal-line',
  16.                     'wysiwyg'
  17.                 ]
  18.             })
  19.         }}
  20.         <div class="row">
  21.             <ul class="list-unstyled">
  22.                 {%  for news in news %}
  23.                     {# @var news \Pimcore\Model\DataObject\News #}
  24.                     {% set detailLink = app_news_detaillink(news) %}
  25.                     <li class="media my-3">
  26.                         {% if news.gallery.items %}
  27.                             {% set image = news.gallery.current %}
  28.                             {% if image.image %}
  29.                                 <a href="{{ detailLink }}">
  30.                                     {{ image.image.thumbnail('newsList').html({imgAttributes: {class: 'mr-3'}}) | raw }}
  31.                                 </a>
  32.                             {% endif %}
  33.                         {% endif %}
  34.                         <div class="media-body">
  35.                             <h5 class="mt-0">
  36.                                 <a href="{{ detailLink }}" class="text-decoration-none text-dark">
  37.                                     {{ news.title }}
  38.                                 </a>
  39.                             </h5>
  40.                             {{ news.shortText }}
  41.                         </div>
  42.                     </li>
  43.                 {% endfor %}
  44.             </ul>
  45.         </div>
  46.         <div class="pt-5">
  47.             {% include 'includes/pagination.html.twig' %}
  48.         </div>
  49.     </div>
  50. {%  endblock %}