templates/module/Markenlogos/__logogroup.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     {{ include('includes/backend-kopf.html.twig') }}
  3.     {% set tabContentArray = {1: 'Optional', 2: 'Headline',3: 'Logozuweisung'} %}
  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.             {% endif %} 
  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.             {% if tabContentArray is defined and 2 in tabContentArray|keys %}
  24.                 {{ admin_tabs(2, tabContentArray) | raw }}
  25.                 <section class="tabContent">
  26.                      <p class="hl">Optional Headline (H2):</p>
  27.                         {{ pimcore_areablock("AreablockTop", {
  28.                                 "allowed": ["H2"],
  29.                                 "toolbar": false,
  30.                                 "areablock_toolbar": {
  31.                                     "title": "Content Konfiguration",
  32.                                     "width": 274,
  33.                                     "x": 570,
  34.                                     "y": 41,
  35.                                     "xAlign": "left",
  36.                                     "buttonWidth": 270,
  37.                                     "buttonMaxCharacters": 35
  38.                                 }
  39.                             })
  40.                         }}                        
  41.                     <br /><br /><hr /><br /><br />
  42.                  </section>
  43.             {% endif %}
  44.             {% if tabContentArray is defined and 3 in tabContentArray|keys %}
  45.                 {{ admin_tabs(3, tabContentArray) | raw }}
  46.                 <section class="tabContent">
  47.                     <div style="width: 100%;padding-left:37px;margin-top:30px;"><p class="hl">Bitte Einzel-Objekt aus 'marken-gruppen' Ordner zuweisen:</p></div>
  48.                     <div class="dragdrop"><span class="parentbox">
  49.                         {{ pimcore_relation("objectLogogroup",{
  50.                                 "types": ["object"],
  51.                                 "subtypes": {
  52.                                     "object": ["object"]
  53.                                 },
  54.                                 "classes": ["marke"],
  55.                                 "width": 750
  56.                             }) }}
  57.                     </span></div>
  58.                     <br /><br /><br /><br />
  59.                 </section>            
  60.             {% endif %}
  61.     </div>
  62.     {{ include('includes/backend-fuss.html.twig') }}
  63. {% else %}
  64.     {% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
  65.     {% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
  66.     {% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
  67.     {% set randomID = random() %}
  68.     {% set logoCount = markenCount %}
  69.     <div class="constrainer-maxsize edgepadding {{ abstandClasses }}">
  70.         <div class="logobar">
  71.             <h4 class="font-thin text-center">{{ 'marken_headline'|trans }}</h4>
  72.             <div class="owl-carousel owl-theme no-item-padding" data-slider="{{ randomID }}" data-logobar>
  73.                 {% if marken is not empty %}
  74.                     {% for key, element in marken %}
  75.                         <div class="logobar-item centered-flex">
  76.                             {% if element.marken_img_href is not empty %}
  77.                                 <a href="{{ element.marken_img_href }}" target="_blank">
  78.                             {% endif %}
  79.                             <img src="{{ element.marken_img_path }}" alt="{{ element.marken_img_alt }}" />
  80.                             {% if element.marken_img_href is not empty %}
  81.                                 </a>
  82.                             {% endif %}
  83.                         </div>
  84.                     {% endfor %}
  85.                 {% endif %}
  86.             </div>
  87.         </div>
  88.     </div>
  89.      <script type="text/javascript">
  90.         (function () {
  91.             var moduleName = 'logo_slider_module'; // naming convention XXX_module
  92.             if (typeof selt === 'undefined') {
  93.                 selt = {
  94.                     modules: {}
  95.                 };
  96.             } else if (!selt.modules) {
  97.                 selt.modules = {};
  98.             }
  99.             selt.modules[moduleName] = {
  100.                 name: moduleName,
  101.                 init: function () {
  102.                     init();
  103.                 }
  104.             };
  105.             function init() {
  106.                 galleryEl = $('[data-slider="{{ randomID }}"]');
  107.                 galleryEl.owlCarousel({
  108.                     center: false,
  109.                     loop: false,
  110.                     items: 2,
  111.                     margin: 0,
  112.                     nav: false,
  113.                     navText: [
  114.                         '<svg viewBox="0 0 27.2 105.2" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><polygon class="st0" points="25.4,105.2 0,52 25.4,0 27.2,0.9 2.2,52 27.2,104.3"/></svg>',
  115.                         '<svg viewBox="0 0 27.2 105.2" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><polygon class="st0" points="25.4,105.2 0,52 25.4,0 27.2,0.9 2.2,52 27.2,104.3"/></svg>'
  116.                     ],
  117.                     responsive: {
  118.                         1280: {
  119.                             items: {{ logoCount < 8 ? logoCount : 8 }}
  120.                         },
  121.                         750: {
  122.                             items: {{ logoCount < 4 ? logoCount : 4 }}
  123.                         },
  124.                         480: {
  125.                             items: {{ logoCount < 2 ? logoCount : 2 }}
  126.                         }
  127.                     }
  128.                 })
  129.             }
  130.         }());//EOS
  131.     </script>
  132. {% endif %}