{% if editmode %}
{{ include('includes/backend-kopf.html.twig') }}
{% set tabContentArray = {1: 'Optional', 2: 'Headline',3: 'Logozuweisung'} %}
{% set tab = 1 %}
<div id="content">
{% if tabContentArray is defined and tab in tabContentArray|keys %}
{{ admin_tabs(tab, tabContentArray) | raw }}
{% endif %}
<section class="tabContent">
<p class="hl">Optionale Einstellung:</p>
{% set element = 'artikel' %}
<div id="{{ element }} ">
{{ pimcore_multiselect(element, {
'width': 200,
'height': 100,
'store': [
['abstand-top', 'Abstand nach oben'],
['abstand-bottom', 'Abstand nach unten']
]
}) }}
</div>
</section>
{% if tabContentArray is defined and 2 in tabContentArray|keys %}
{{ admin_tabs(2, tabContentArray) | raw }}
<section class="tabContent">
<p class="hl">Optional Headline (H2):</p>
{{ pimcore_areablock("AreablockTop", {
"allowed": ["H2"],
"toolbar": false,
"areablock_toolbar": {
"title": "Content Konfiguration",
"width": 274,
"x": 570,
"y": 41,
"xAlign": "left",
"buttonWidth": 270,
"buttonMaxCharacters": 35
}
})
}}
<br /><br /><hr /><br /><br />
</section>
{% endif %}
{% if tabContentArray is defined and 3 in tabContentArray|keys %}
{{ admin_tabs(3, tabContentArray) | raw }}
<section class="tabContent">
<div style="width: 100%;padding-left:37px;margin-top:30px;"><p class="hl">Bitte Einzel-Objekt aus 'marken-gruppen' Ordner zuweisen:</p></div>
<div class="dragdrop"><span class="parentbox">
{{ pimcore_relation("objectLogogroup",{
"types": ["object"],
"subtypes": {
"object": ["object"]
},
"classes": ["marke"],
"width": 750
}) }}
</span></div>
<br /><br /><br /><br />
</section>
{% endif %}
</div>
{{ include('includes/backend-fuss.html.twig') }}
{% else %}
{% set abstand_top_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-top') == true)? ' abstand-top' : '' %}
{% set abstand_bottom_class = (checkMultiselect(pimcore_multiselect("artikel"),'abstand-bottom') == true)? ' abstand-bottom' : '' %}
{% set abstandClasses = abstand_top_class ~ abstand_bottom_class %}
{% set randomID = random() %}
{% set logoCount = markenCount %}
<div class="constrainer-maxsize edgepadding {{ abstandClasses }}">
<div class="logobar">
<h4 class="font-thin text-center">{{ 'marken_headline'|trans }}</h4>
<div class="owl-carousel owl-theme no-item-padding" data-slider="{{ randomID }}" data-logobar>
{% if marken is not empty %}
{% for key, element in marken %}
<div class="logobar-item centered-flex">
{% if element.marken_img_href is not empty %}
<a href="{{ element.marken_img_href }}" target="_blank">
{% endif %}
<img src="{{ element.marken_img_path }}" alt="{{ element.marken_img_alt }}" />
{% if element.marken_img_href is not empty %}
</a>
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
<script type="text/javascript">
(function () {
var moduleName = 'logo_slider_module'; // naming convention XXX_module
if (typeof selt === 'undefined') {
selt = {
modules: {}
};
} else if (!selt.modules) {
selt.modules = {};
}
selt.modules[moduleName] = {
name: moduleName,
init: function () {
init();
}
};
function init() {
galleryEl = $('[data-slider="{{ randomID }}"]');
galleryEl.owlCarousel({
center: false,
loop: false,
items: 2,
margin: 0,
nav: false,
navText: [
'<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>',
'<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>'
],
responsive: {
1280: {
items: {{ logoCount < 8 ? logoCount : 8 }}
},
750: {
items: {{ logoCount < 4 ? logoCount : 4 }}
},
480: {
items: {{ logoCount < 2 ? logoCount : 2 }}
}
}
})
}
}());//EOS
</script>
{% endif %}