<section class="container content-block js-fade-in {{ include('Layout/includes/editmode-box-classes.html.twig') }} {{ styleModifier | default(null) }} {{ not pimcore_input('anchorTitle').empty ? 'js-anchor-nav__item' : '' }}" {% if not pimcore_input('anchorTitle').empty %}data-anchor-nav-title="{{ pimcore_input('anchorTitle').frontend }}"{% endif %}>
{% embed 'Includes/editmode-settings.html.twig' %}
{% block additionalInfo %}
<div>
<label>
{{ pimcore_checkbox('titleBlockCentered') }} Center Headline?
</label>
</div>
<div>
<label>
{{ pimcore_checkbox('teaserCentered') }} Center Teaser (if less then 6 teaser)?
</label>
</div>
<div>
<label>
{{ pimcore_checkbox('rotateTeaser') }} Rotate Teaser (Displayed teasers change every 24 hours or if the relation changes).
</label>
</div>
<div>
<label>
Teaser (max 12 Teaser others will be ignored)
<small>Supported: DemiInfrastructure, Package, DemiAccommodation, DemiEvent, DemiAdditionalService, BlogArticle, AlpsteinTour, Community, YoungStyriaAccommodation, Image Teaser Snippet, Content Teaser Snippet</small>
</label>
{{ pimcore_relations('teaser', {
'types': ['document', 'object'],
'subtypes': ['snippet', 'object'],
'classes': ['demiAdditionalService', 'demiInfrastructure', 'demiEvent', 'BlogArticle', 'Community', 'Package', 'demiAccommodationServiceProvider', 'AlpsteinTour', 'demiHousePackageMaster', 'YoungStyriaAccommodation']
}) }}
</div>
{% endblock %}
{% endembed %}
{{ include('Includes/title-block-editable.html.twig') }}
<div class="teaser-slider js-scrolling-row">
<div class="row js-scrolling-row__row scrolling-row {{ pimcore_checkbox('teaserCentered').checked and pimcore_relations('teaser').elements|length < 6 ? 'scrolling-row--centered' : ''}} scrolling-row--invisible-scrollbar">
{% set elements = removeUnpublishedElements(pimcore_relations('teaser').elements) %}
{% set elements = pimcore_checkbox('rotateTeaser').checked ? randomizeRelationEvery24h(elements, document) : elements %}
{% for key,item in elements | filter ((item,key) => key < 12 ) %}
{% if item is instanceof('\\Pimcore\\Model\\DataObject') %}
{% if checkObjectForTeaser(item) %}
<div class="scrolling-row__item col-5 col-md-2 js-scrolling-row__item">
{{ render(controller('App\\Controller\\RenderletController::imgTeaserAction', {
'type': 'object',
'id': item.id,
'notShowPrice': true
})) }}
</div>
{% endif %}
{% elseif item is instanceof('\\Pimcore\\Model\\Document\\Snippet') %}
<div class="scrolling-row__item col-5 col-md-2 js-scrolling-row__item">
{{ render(controller('App\\Controller\\RenderletController::imgTeaserAction', {
'type': 'document',
'id': item.id
})) }}
</div>
{% endif %}
{% endfor %}
</div>
{% if pimcore_relations('teaser').elements|length > 6 %}
<div class="scrolling-row-navigation">
<button class="teaser-slider__btn scrolling-row__button scrolling-row__button--prev js-scrolling-row__prev"><span class="icon icon-arrow-right" aria-label="Previous"></span></button>
<button class="teaser-slider__btn scrolling-row__button scrolling-row__button--next js-scrolling-row__next"><span class="icon icon-arrow-right" aria-label="Next"></span></button>
</div>
{% endif %}
</div>
</section>