templates/areas/hero-grid/view.html.twig line 1

Open in your IDE?
  1. {% if  editmode %}
  2. <div class="alert alert-secondary">
  3.     {{ 'Please use same aspect ratio images for best result.' }}
  4. </div>
  5. {% endif %}
  6. {% set id = uniqid('heroGrid-') %}
  7. <section id="{{ id }}" class="section grid-gallery no-gutters {{ (not editmode?'row':'') }}">
  8. {% for i in pimcore_iterate_block(pimcore_block('heroGridBlock', {class:'row m-0'})) %}
  9.     <div class="grid-gallery-item grid-gallery-item-{{ id }}-{{ i }} {{ (not editmode?'col-md-6':'') }} zoom-outer">
  10.         {% if not editmode %}
  11.             <a href="{{ pimcore_link('heroGridLink' ~ i).href }}">
  12.         {% endif %}
  13.             <span  class="tint {{ (not editmode?'zoom-inner':'') }}">
  14.                 {{
  15.                     pimcore_image('heroGridImage' ~ i, {
  16.                         dropClass: 'grid-gallery-item-' ~ id ~ '-' ~ i,
  17.                         reload: true,
  18.                         hidetext: true,
  19.                         thumbnail: 'heroGrid',
  20.                         imgAttributes: {class: 'img-fluid'},
  21.                         title: 'Drag background image here'
  22.                     })
  23.                 }}
  24.             </span>
  25.              <span class="grid-gallery-item-text">
  26.                 <h2 class="text-uppercase">{{ pimcore_input('heroGridHeadline' ~ i,{placeholder: 'Headline'}) }}</h2>
  27.                 <h5>{{ pimcore_input('heroGridSubheadline' ~ i,{placeholder: 'Sub Headline'}) }}</h5>
  28.                 {% if editmode %}
  29.                     <div class="mx-auto">{{ pimcore_link('heroGridLink' ~ i) }}</div>
  30.                 {% endif %}
  31.             </span>
  32.         {% if not editmode %}
  33.             </a>
  34.         {% endif %}
  35.     </div>
  36. {% endfor %}
  37. </section>