{% set options = options|default([]) + { block_variant: 'default', block_container_class: 'container', block_list_container_class: '', list_label: false, list_container_class: 'col-12', list_row_class: 'row', list_loadmore_url: false, list_loadmore_url_ajax: false, list_offset: 0, list_excludes: [], list_teasers_inject: [], list_contentad: true, list_contentad_pos: 4, list_contentad_slot: 'mosaic', list_contentad_custom: {}, list_contentad_class: 'advertisement-DL', teaser_container_class: 'col-sm-6 col-12', teaser_template: 'components/teaser/default.twig', } %} {# list_contentad is by default set to false, as it is not a standard function for all the websites, yet ... #}
{% if options.list_label %} {% block list_label %}
{{ options.list_label }}
{% endblock %} {% endif %} {# Teaserlist #}
{% block teaserlist %}
{% for teaser in teasers|default([]) if teaser %} {% set inject = options.list_teasers_inject[loop.index0]|default %} {% if inject %} {{ inject|raw }} {% endif %} {% set addSlotTemplate = '' %} {% if options.list_contentad and options.list_contentad_pos == loop.index %} {% set addSlotTemplate %} {% include 'components/ads/slot.twig' with {options:{ slot_type: options.list_contentad_slot, slot_custom: options.list_contentad_custom, slot_class: 'overlay ' ~ options.list_contentad_class, }} %} {% endset %} {% endif %} {% embed options.teaser_template with {'teaser': teaser, 'options': options} %} {% block teaser_content %} {{ addSlotTemplate|raw }} {{ parent() }} {% endblock %} {% endembed %} {% endfor %}
{% endblock %}
{% if options.list_loadmore_url|default %} {% set listId = buid() %} {% if options.list_loadmore_url_ajax|default %} {% endif %} {% endif %}