src/Package/Openform/Front/Templates/_blocks_sections/_sponsors.html.twig line 1

Open in your IDE?
  1. <section class="block-item block-sponsors">
  2.     <div class="block-sponsors__wrapper">
  3.         {% if block.Translation[app.request.locale].title|length > 0 %}
  4.             <div class="block-sponsors__title">
  5.                 <h2 class="block-sponsors__title-inner block__h3">{{ block.Translation[app.request.locale].title|nl2br }}</h2>
  6.             </div>
  7.         {% endif %}
  8.         {% if block.Logotypes.stat is defined and block.Logotypes.stat %}
  9.             {% set images = block.Logotypes.getAllVisibleImages(app.request.locale) %}
  10.         {% else %}
  11.             {% set images = [] %}
  12.         {% endif %}
  13.             
  14.         {% if images|length > 0 %}
  15.             <div class="block-sponsors__list">
  16.                 {% for slide in images %}
  17.                     <li class="block-sponsors__item">
  18.                         {% set img = slide.imagePath %}
  19.                         {% set title = '' %}
  20.                         {% set alt = '' %}
  21.                         {% if slide.Translation[app.request.locale].title is defined and slide.Translation[app.request.locale].title %}
  22.                             {% set title = slide.Translation[app.request.locale].title %}
  23.                         {% endif %}
  24.                         {% if slide.Translation[app.request.locale].alt is defined and slide.Translation[app.request.locale].alt %}
  25.                             {% set alt = slide.Translation[app.request.locale].alt %}
  26.                         {% endif %}
  27.                         {% if slide.Translation[app.request.locale].link %}
  28.                             <a class="block-sponsors__item-content block-sponsors__item-content--link" href="{{ slide.Translation[app.request.locale].link }}" target="_blank">
  29.                                 {% if title|length > 0 %}
  30.                                     <h5 class="block-sponsors__item-title">{{ title }}</h5>
  31.                                 {% endif %}
  32.                                 <img 
  33.                                     class="block-sponsors__item-img" 
  34.                                     src="{{ slide.Thumb['sponsors'].filePath ? slide.Thumb['sponsors'].filePath : '' }}" 
  35.                                     alt="{{ alt }}" 
  36.                                 />
  37.                             </a>
  38.                         {% else %}
  39.                             <div class="block-sponsors__item-content block-sponsors__item-content--block">
  40.                                 {% if title|length > 0 %}
  41.                                     <h5 class="block-sponsors__item-title">{{ title }}</h5>
  42.                                 {% endif %}
  43.                                 <img 
  44.                                     class="block-sponsors__item-img" 
  45.                                     src="{{ slide.Thumb['sponsors'].filePath ? slide.Thumb['sponsors'].filePath : '' }}" 
  46.                                     alt="{{ alt }}" 
  47.                                 />
  48.                             </div>
  49.                         {% endif %}
  50.                     </li>
  51.                 {% endfor %}
  52.             </div>
  53.         {% endif %}
  54.     </div>
  55. </section>