{# /** * @file * Magazine+'s theme override for the block entity refernece field for the tabs powered custom block * * @see magazineplus_preprocess_field__block_content__mt_fancy_tabs_block() */ #} {{ attach_library('magazineplus/media-tabs') }} {% set classes = [ 'field', 'field--name-' ~ field_name|clean_class, 'field--type-' ~ field_type|clean_class, 'field--label-' ~ label_display, 'field--entity-reference-target-type-' ~ entity_reference_target_type|clean_class, 'field--mt-media-tabs-block', 'clearfix', ] %} {% set title_classes = [ 'field__label', label_display == 'inline' ? 'inline', ] %} {% if not label_hidden %} {{ label }} {% endif %}
{% for item in items %}
{% if item.content['#paragraph'].field_mt_media_image.value or item.content['#paragraph'].field_mt_media_video.value %}
{% if item.content['#paragraph'].field_mt_media_video.value %} {{ item.video_field }} {% elseif item.content['#paragraph'].field_mt_media_image.value %}
{% if item.content['#paragraph'].field_mt_media_button.title %} {{ item.content['#paragraph'].field_mt_media_button.title }} {% endif %} {{ item.content['#paragraph'].field_mt_media_image.alt }}
{% endif %}
{% endif %}
{% if item.content['#paragraph'].field_mt_media_title.value %}

{{ item.content['#paragraph'].field_mt_media_title.value }}

{% endif %} {% if item.content['#paragraph'].field_mt_media_body.value %}
{{ item.content }}
{% endif %} {% if item.content['#paragraph'].field_mt_media_button.title %} {% endif %}
{% endfor %}