custom/plugins/Itptheme/src/Resources/views/storefront/element/cms-element-image-gallery.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-image-gallery.html.twig' %}
  2. {% block element_image_gallery_inner %}
  3.     {% set zoom = false %}
  4.     {% set magnifierOptions = [] %}
  5.     {{ parent() }}
  6. {% endblock %}
  7. {% block element_image_gallery_inner_item %}
  8.     <div class="gallery-slider-item-container">
  9.         <div class="gallery-slider-item is-{{ displayMode }} js-magnifier-container"{% if minHeight and  (displayMode == "cover" or displayMode == "contain" ) %} style="min-height: {{ minHeight }}"{% endif %}>
  10.             {% set altAndTitle = (image.translated.alt ?: fallbackImageTitle) %}
  11.             {% if loop.first %}
  12.                 {% set altAndTitle = page.product.translated.description %}
  13.             {% endif %}
  14.             {% if loop.index == 2 %}
  15.                 {% set altAndTitle = "detail.altTitleTagDrawing"|trans ~ page.product.translated.name %}
  16.             {% endif %}
  17.             {% set attributes = {
  18.                 'class': 'img-fluid gallery-slider-image magnifier-image js-magnifier-image',
  19.                 'alt': altAndTitle,
  20.                 'title': altAndTitle,
  21.                 'data-full-image': image.url
  22.             } %}
  23.             {% if displayMode == 'cover' or displayMode == 'contain' %}
  24.                 {% set attributes = attributes|merge({ 'data-object-fit': displayMode }) %}
  25.             {% endif %}
  26.             {% if isProduct %}
  27.                 {% set attributes = attributes|merge({ 'itemprop': 'image' }) %}
  28.             {% endif %}
  29.             {% sw_thumbnails 'gallery-slider-image-thumbnails' with {
  30.                 media: image
  31.             } %}
  32.         </div>
  33.     </div>
  34. {% endblock %}
  35. {% block element_image_gallery_inner_thumbnails_item_inner %}
  36.     <div class="gallery-slider-thumbnails-item-inner">
  37.         {% set altAndTitle = (image.translated.alt ?: fallbackImageTitle) %}
  38.         {% if loop.first %}
  39.             {% set altAndTitle = page.product.translated.description %}
  40.         {% endif %}
  41.         {% if loop.index == 2 %}
  42.             {% set altAndTitle = "detail.altTitleTagDrawing"|trans ~ page.product.translated.name %}
  43.         {% endif %}
  44.         {% set attributes = {
  45.             'class': 'gallery-slider-thumbnails-image',
  46.             'alt': altAndTitle,
  47.             'title': altAndTitle
  48.         } %}
  49.         {% if isProduct %}
  50.             {% set attributes = attributes|merge({ 'itemprop': 'image' }) %}
  51.         {% endif %}
  52.         {% sw_thumbnails 'gallery-slider-thumbnails-image-thumbnails' with {
  53.             media: image,
  54.             sizes: {
  55.                 'default': '200px'
  56.             }
  57.         } %}
  58.     </div>
  59. {% endblock %}