templates/module/Image/__image.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     {{ include('includes/backend-kopf.html.twig') }}
  3.     {% set tabContentArray = {1: 'Optional', 2: 'Bildzuweisung'} %}
  4.     {% set tab = 1 %}
  5.     <div id="content">        
  6.             {% if tabContentArray is defined and tab in tabContentArray|keys %}
  7.                 {{ admin_tabs(tab, tabContentArray) | raw }}
  8.             
  9.                 <section class="tabContent">
  10.                     <p class="hl">Optionale Einstellung:</p>
  11.                     {% set element = 'artikel' %}
  12.                     <div id="{{ element }} ">
  13.                         {{ pimcore_multiselect(element, {
  14.                                 'width': 200,
  15.                                 'height': 100,
  16.                                 'store': [
  17.                                     ['abstand-top', 'Abstand nach oben'],
  18.                                     ['abstand-bottom', 'Abstand nach unten']
  19.                                 ]
  20.                             }) }}
  21.                     </div>
  22.                 </section>
  23.             {% endif %} 
  24.              {% if tabContentArray is defined and 2 in tabContentArray|keys %}
  25.                 {{ admin_tabs(2, tabContentArray) | raw }}
  26.                 <section class="tabContent">
  27.                      <p class="hl">Bild: Breite 2400 x Höhe variabel (Pixel)</p>
  28.                        <div class="dragdrop"><span class="parentbox">
  29.                         {{ pimcore_image("bildmodul", {
  30.                             "title" : "Bild hier hereinziehen",
  31.                             "width": 200,
  32.                             "height": 130,
  33.                             "hidetext": true,
  34.                             "thumbnail": "img-default-edm"
  35.                         }) }}</span></div>
  36.                 </section>
  37.             {% endif %}
  38.     </div>
  39.     {{ include('includes/backend-fuss.html.twig') }}
  40. {% else %} 
  41.     {% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
  42.     {% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
  43.     {% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
  44.     {% set image_path = pimcore_image("bildmodul").getSrc() %}
  45.     <div class="{{ abstandClasses }}">
  46.         {% set lang = app.request.getLocale() %}    
  47.         {% if image_path is not empty %}
  48.                 {{ imageResponsive({"src": image_path,
  49.                    "ausgabeformat": "img",
  50.                    "class": "",
  51.                    "language": lang }) | raw }}
  52.         {% endif %}
  53.     </div>
  54. {% endif %}