src/Package/Openform/Front/Templates/Exhibition/_item.html.twig line 1

Open in your IDE?
  1. {% set img = openform_front_util.getImagePathByType(item.Thumb ?? '','list') %}
  2. {% set href = toolkit_route_localizer.generate('exhibition_item',{ 'slug' : item.Translation[app.request.locale].slug }, app.request.locale) %}
  3. <a class="news-item news-item--exh" href="{{ href }}" aria-label="{{ 'T_READ_MORE'|trans({}, 'openform_front', app.request.locale) }} {{ item.Translation[app.request.locale].title }}"
  4.     >
  5.     {% if img %}
  6.         <img class="news-item__image" loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].alt }}">
  7.     {% endif %}
  8.     <div class="news-item__content">
  9.         <h2 class="news-item__title news-item__title--exh">{{ item.Translation[app.request.locale].titleHtml|raw }}</h2>  
  10.         <div class="news-item__date-wrapper">
  11.             {# <time class="news-item__date">
  12.                 {{ item.publishDate|explodedDate(app.request.locale).D }}
  13.                 {{ item.publishDate|explodedDate(app.request.locale).month }}
  14.                 {{ item.publishDate|explodedDate(app.request.locale).y }}
  15.             </time> #}
  16.         </div>
  17.         <p class="news-item__text news-item__text--exh">{{ item.Translation[app.request.locale].shortLead }}</p>
  18.         {% if item.logo[0] is defined ? item.logo[0] %}
  19.         {% set imgLogo = openform_front_util.getImagePathByType(item.logo[0].Thumb ?? '','logo') %}
  20.         <div class="news-item__logotype">
  21.             <img src="{{imgLogo}}" alt="{{item.logo[0].Translation[app.request.locale].alt}}" title="{{item.logo[0].Translation[app.request.locale].title}}">
  22.         </div>
  23.         {% endif %}
  24.     </div>
  25.     
  26. </a>