templates/module/Teaser/__teaser-hoch.html.twig line 1

Open in your IDE?
  1. {% if editmode %}
  2.     {{ include('includes/backend-kopf.html.twig') }}
  3.     {% set tabContentArray = {1: 'Optional', 2: 'Content'} %}
  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.                     <p class="hl">Bitte Objekt-Ordner Teaser Quer (aus jeweiligen Theme) zuweisen:</p>
  43.                     <div class="dragdrop"><span class="parentbox">
  44.                         {{ pimcore_renderlet('teaserfolder', {
  45.                                 "controller" : "App\\Controller\\Module\\TeaserController::teaserAction",
  46.                                 "height" : 400,
  47.                                 "width": 300
  48.                             }) }}
  49.                     </span></div>
  50.                     <br /><br /><br /><br />
  51.                     <p class="hl">Optional Button:</p>
  52.                         {{ pimcore_areablock("AreablockBottom", {
  53.                                 "allowed": ["ContentButton"],
  54.                                 "toolbar": false,
  55.                                 "areablock_toolbar": {
  56.                                     "title": "Content Konfiguration",
  57.                                     "width": 274,
  58.                                     "x": 570,
  59.                                     "y": 41,
  60.                                     "xAlign": "left",
  61.                                     "buttonWidth": 270,
  62.                                     "buttonMaxCharacters": 35
  63.                                 }
  64.                             })
  65.                         }}                        
  66.                         <br /><br /><br /><br />
  67.                         
  68.                     <p class="hl">Bitte ordnen Sie Objekte aus dem Ordner Teaser Hoch zu (falls Sie mit der Reihenfolge manipulieren möchten)::</p>
  69.                     <div class="dragdrop pimcore-relations-custom"><span class="parentbox">
  70.                         {{ pimcore_relations("teaserobjects", {
  71.                             "width": 550,
  72.                             "types": ["object"],
  73.                             "subtypes": {
  74.                                 "object": ["object"]
  75.                             },
  76.                         }) }}
  77.                     </span></div>
  78.                 </section>
  79.             {% endif %}
  80.     </div>
  81.     {{ include('includes/backend-fuss.html.twig') }}
  82. {% else %}
  83.      {% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
  84.     {% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
  85.     {% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
  86.     {% set sliderId = document.getId() %}
  87.     {% set numberOfItems = 0 %}
  88.     <div class="{{ abstandClasses }}">
  89.         {% set areaBlock = pimcore_areablock("AreablockTop") %}
  90.             {% if areaBlock.isEmpty() == false %}
  91.                 <div class="constrainer-maxsize edgepadding">
  92.                     {{ areaBlock | raw }}
  93.                 </div> 
  94.             {% endif %}
  95.             <div class="constrainer-maxsize constrainer-maxsize--slider">
  96.                 <div class="owl-carousel owl-theme no-underline" data-slider="{{ sliderId }}">
  97.                     {% for key,element in teaser %}
  98.                         <div class="teaser-vertical--col-4">
  99.                         {% if element.href_teaser_link is not empty %}
  100.                             <a href="{{ element.href_teaser_link }}" target="{{ element.href_teaser_target }}" class="no-underline">
  101.                         {% endif %}
  102.                         
  103.                         {% if element.teaser_bild_default is not empty  %}
  104.                         <img src="{{ element.teaser_bild_default }}" data-srcset="{{ element.teaser_bild_normal }}, {{ element.teaser_bild_retina }} 2x," alt="{{ element.teaser_bild__alttag }}" class="lazyload"/>
  105.                            {% endif %}
  106.                            
  107.                         <div class="copy">
  108.                             {% if element.teaser_headline is not empty %}
  109.                                     <h3 class="theme-color font-bold">{{ element.teaser_headline |raw }} </h3>
  110.                             {% endif %}
  111.                             {% if element.teaser_text is not empty %}
  112.                                  <div class="font-size-normal font-light">{{ element.teaser_text |raw }}</div>
  113.                             {% endif %}
  114.                         </div>
  115.         
  116.                         {% if element.show_button_and_ancor is not empty %}
  117.                             {% if element.teaser_button_text is not empty %}
  118.                                 <div class="btn-wrp"><button aria-label="{{ 'More' }}" class="btn-small font-light"><span style="transform: translateY(2px); display: block;">{{ element.teaser_button_text | raw }}</span></button></div>
  119.                             {% else %}
  120.                                 <div class="btn-wrp arrow-button"><button aria-label="{{ 'More' }}"></button></div>
  121.                             {% endif %}
  122.                         {% endif %}    
  123.                         {% if element.href_teaser_link is not empty %}
  124.                             </a>
  125.                         {% endif %}
  126.                         </div>
  127.                     {% endfor %}  
  128.                 </div>
  129.             </div>
  130.     </div>
  131.      <script type="text/javascript">
  132.         (function () {
  133.             var moduleName = 'teaser_slider_{{ sliderId }}_module'; // naming convention XXX_module
  134.             if (typeof selt === 'undefined') {
  135.                 selt = {
  136.                     modules: {}
  137.                 };
  138.             } else if (!selt.modules) {
  139.                 selt.modules = {};
  140.             }
  141.             selt.modules[moduleName] = {
  142.                 name: moduleName,
  143.                 init: function () {
  144.                     init();
  145.                 }
  146.             };
  147.             function init() {
  148.                 galleryEl = $('[data-slider="{{ sliderId }}"]');
  149.                 galleryEl.owlCarousel({
  150.                     center: false,
  151.                     loop: false,
  152.                     items: 1,
  153.                     margin: 0,
  154.                     nav: true,
  155.                     navText: [
  156.                         '<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>',
  157.                         '<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>'
  158.                     ],
  159.                     responsive: {
  160.                         1280: {
  161.                             items: 4
  162.                         },
  163.                         950: {
  164.                             items: 3
  165.                         },
  166.                         700: {
  167.                             items: 2
  168.                         }
  169.                     }
  170.                 }).on('resized.owl.carousel', function (event) {
  171.                     galleryEl.trigger('to.owl.carousel', [1, 1000]);
  172.                 });
  173.                 galleryEl.find('.owl-item .copy').matchHeight({
  174.                     byRow: false
  175.                 });
  176.             }
  177.         }());//EOS
  178.     </script>
  179. {% endif %}