templates/news/listing.html.twig line 1

Open in your IDE?
  1. {% extends 'layouts/layout.html.twig' %}
  2. {% block content %}
  3.     <main class="pullc">
  4.         <div class="container-xl">
  5.             <div class="row">
  6.                 <div class="col-lg-3 leftpull section-pillar d-none d-lg-block" {% if pillar_background %} style="background-image: url({{ pillar_background.thumbnail('pillar') }})" {% endif %}>
  7. <div class="section-title px-3 px-lg-3 ps-lg-0 d-flex flex-column">
  8.                         <h1 class="mb-lg-5 pt-1 pe-lg-4 mt-5 text-lg-end">{{ section_title }}
  9.                             </h1>
  10.                     </div>
  11.         {% if document.getProperty('pillar_background') %}
  12.                         {% if document.getProperty('pillar_background').getMetadata('Credit') %}
  13.                             <div class="pillar-credit">
  14.                                 Image:
  15.                                 {{ document.getProperty('pillar_background').getMetadata('Credit') }}
  16.                             </div>
  17.                         {% endif %}
  18.                     {% endif %}
  19.                 </div>
  20.                 <div class="col-lg-9 ps-lg-5 pe-lg-5 pb-4">
  21.     
  22.                         <div class="breadcrumbs mt-3">
  23.                             <a href="/">{{ "Home"|trans }}</a>
  24.                             &raquo;
  25.                             {{ document.key }}
  26.                         </div>
  27.             
  28.                     <h1 class="my-3">{{ pimcore_input("headline", {"placeholder":"Headline", "width": 600}) }}</h1>
  29.                     {% for news in newsListing %}
  30.                         {% set detailLink = app_news_detaillink(news) %}
  31.                         <div class="row mb-4 py-2 newslist">
  32.                             <div class="col-12 col-lg-3">
  33.                                 {% if news.list_image %}
  34.                                     {{ news.list_image.thumbnail('newsfront').html({'imgAttributes': {
  35.                             'class': 'newslistimg',
  36.                             'alt': news.title,
  37.                            },}) | raw }}
  38.                                 {% elseif news.image %}
  39.                                     {{ news.image.thumbnail('newsfront').html({'imgAttributes': {
  40.                             'class': 'newslistimg',
  41.                             'alt': news.title,
  42.                            },}) | raw }}
  43.                            {% else %}
  44.                                     {{ document.getProperty('fallback_newsimg').thumbnail('newsfront').html({'imgAttributes': {
  45.                             'class': 'newslistimg',
  46.                             'alt': news.title,
  47.                            },}) | raw }}
  48.                                 {% endif %}
  49.                             </div>
  50.                             <div class="col-12 col-lg-9">
  51.                                 <span class="rdate pt-2">
  52.                                     {{ news.publish_date|date("D j M Y") }}
  53.                                 </span>
  54.                                 <h2>
  55.                                     <a class="listlink purplelink stretched-link" href="{{ detailLink }}">{{ news.title }}</a>
  56.                                 </h2>
  57.                                 <p>
  58.                                     {{ news.intro }}
  59.                                 </p>
  60.                             </div>
  61.                         </div>
  62.                     {% endfor %}
  63.                     {% include 'includes/pagination.html.twig' %}
  64.                 </div>
  65.             </div>
  66.         </div>
  67.     </main>
  68. {% endblock %}