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

Open in your IDE?
  1. {% sw_extends '@parent/storefront/element/cms-element-image-gallery.html.twig' %}
  2. {% block element_image_gallery_inner %}
  3.     <div class="row gallery-slider-row{% if imageCount == 1 %} is-single-image{% endif %} js-gallery-zoom-modal-container"
  4.             {% if zoom %}
  5.                 data-magnifier="true"
  6.             {% endif %}
  7.             {% if magnifierOptions|length > 0 %}
  8.                 data-magnifier-options='{{ magnifierOptions|json_encode|raw }}'
  9.             {% endif %}
  10.             {% if imageCount > 1 %}
  11.         data-gallery-slider="true"
  12.         data-gallery-slider-options='{
  13.                                 "slider": {
  14.                                     "navPosition": "bottom",
  15.                                     "speed": 500,
  16.                                     "gutter": {% if gutter %} {{ gutter }} {% else %} 0 {% endif %},
  17.                                     "controls": {% if navigationArrows %}true{% else %}false{% endif %},
  18.                                     "autoHeight": {% if displayMode == "standard" %}true{% else %}false{% endif %}
  19.                                     {% if startIndexThumbnails %}
  20.                                     ,"startIndex": {{ startIndexThumbnails }}
  21.                                     {% endif %}
  22.                                 },
  23.                                 "thumbnailSlider": {
  24.                                     {% if galleryPosition == "underneath" %}
  25. {#                                    "autoWidth": true,#}
  26. {#                                    "controls": false,#}
  27.                                     {% endif %}
  28.                                     {% if startIndexThumbnails %}
  29.                                     "startIndex": {{ startIndexThumbnails }},
  30.                                     {% endif %}
  31.                                     "items": 4,
  32.                                     "loop" : true,
  33.                                     "responsive": {
  34.                                         "xs": {
  35.                                             "enabled": false,
  36.                                             "controls": false
  37.                                         },
  38.                                         "sm": {
  39.                                             "enabled": false,
  40.                                             "controls": false
  41.                                         }{% if galleryPosition == "left" %},
  42.                                         "md": {
  43.                                             "axis": "vertical"
  44.                                         },
  45.                                         "lg": {
  46.                                             "axis": "vertical"
  47.                                         },
  48.                                         "xl": {
  49.                                             "axis": "vertical"
  50.                                         }{% else %},
  51.                                         "md": {
  52.                                             "axis": "horizontal",
  53.                                             "items" : 3
  54.                                         },
  55.                                         "lg": {
  56.                                             "axis": "horizontal"
  57.                                         },
  58.                                         "xl": {
  59.                                             "axis": "horizontal",
  60.                                             "items": 4
  61.                                         }{% endif %}
  62.                                     }
  63.                                 }
  64.                             }'
  65.             {% endif %}>
  66.         {% block element_image_gallery_inner_col %}
  67.             {{ parent() }}
  68.         {% endblock %}
  69.         {% block element_image_gallery_inner_thumbnails_col %}
  70.             {% if imageCount > 1 %}
  71.                 <div class="gallery-slider-thumbnails-col{% if galleryPosition == "left" %} col-0 col-md-auto order-2 order-md-1 is-left{% elseif galleryPosition == "underneath" %} col-12 order-2 is-underneath{% endif %}">
  72.                     <div class="gallery-slider-thumbnails-container">
  73.                         {% block element_image_gallery_inner_thumbnails %}
  74.                             <div class="gallery-slider-thumbnails{% if galleryPosition == "underneath" %} is-underneath{% endif %}"
  75.                                  data-gallery-slider-thumbnails="true">
  76.                                 {% block element_image_gallery_inner_thumbnails_items %}
  77.                                     {% for image in mediaItems %}
  78.                                         {% block element_image_gallery_inner_thumbnails_item %}
  79.                                             <div class="gallery-slider-thumbnails-item">
  80.                                                 {% block element_image_gallery_inner_thumbnails_item_inner %}
  81.                                                     <div class="gallery-slider-thumbnails-item-inner">
  82.                                                         {% set attributes = {
  83.                                                             'class': 'gallery-slider-thumbnails-image',
  84.                                                             'alt': (image.translated.alt ?: fallbackImageTitle),
  85.                                                             'title': (image.translated.title ?: fallbackImageTitle)
  86.                                                         } %}
  87.                                                         {% if isProduct %}
  88.                                                             {% set attributes = attributes|merge({ 'itemprop': 'image' }) %}
  89.                                                         {% endif %}
  90.                                                         {% sw_thumbnails 'gallery-slider-thumbnails-image-thumbnails' with {
  91.                                                             media: image,
  92.                                                             sizes: {
  93.                                                                 'default': '200px'
  94.                                                             }
  95.                                                         } %}
  96.                                                     </div>
  97.                                                 {% endblock %}
  98.                                             </div>
  99.                                         {% endblock %}
  100.                                     {% endfor %}
  101.                                 {% endblock %}
  102.                             </div>
  103.                         {% endblock %}
  104.                         {% block element_image_gallery_inner_thumbnails_controls %}
  105.                             {% if galleryPosition == "left" %}
  106.                                 <div data-thumbnail-slider-controls="true"
  107.                                      class="gallery-slider-thumbnails-controls">
  108.                                     <button class="base-slider-controls-prev gallery-slider-thumbnails-controls-prev">
  109.                                         {% sw_icon 'arrow-head-up' %}
  110.                                     </button>
  111.                                     <button class="base-slider-controls-next gallery-slider-thumbnails-controls-next">
  112.                                         {% sw_icon 'arrow-head-down' %}
  113.                                     </button>
  114.                                 </div>
  115.                             {% else %}
  116.                                 <div data-thumbnail-slider-controls="true"
  117.                                      class="gallery-slider-thumbnails-controls">
  118.                                     <button class="base-slider-controls-prev gallery-slider-thumbnails-controls-prev">
  119.                                         {% sw_icon 'fa-angle-left' style {'pack' : 'light', 'namespace': 'MDR_Theme'} %}
  120.                                     </button>
  121.                                     <button class="base-slider-controls-next gallery-slider-thumbnails-controls-next">
  122.                                         {% sw_icon 'fa-angle-right' style {'pack' : 'light', 'namespace': 'MDR_Theme'} %}
  123.                                     </button>
  124.                                 </div>
  125.                             {% endif %}
  126.                         {% endblock %}
  127.                     </div>
  128.                 </div>
  129.             {% endif %}
  130.         {% endblock %}
  131.         {% block element_image_gallery_inner_zoom_modal_wrapper %}
  132.             {{ parent() }}
  133.         {% endblock %}
  134.     </div>
  135. {% endblock %}
  136. {% block element_image_gallery_inner_control_prev_icon %}
  137.     {% sw_icon 'fa-angle-left' style {'pack' : 'light', 'namespace': 'MDR_Theme'} %}
  138. {% endblock %}
  139. {% block element_image_gallery_inner_control_next_icon %}
  140.     {% sw_icon 'fa-angle-right' style {'pack' : 'light', 'namespace': 'MDR_Theme'} %}
  141. {% endblock %}