{# Bloc Image illustrée Variables : block.images[].filename string — chemin de l'image block.images[].alt string — texte alternatif (multilingue via page_block_image_translations) block.images[].caption string — légende optionnelle (multilingue via page_block_image_translations) block.images[].credits string — crédit optionnel (non-multilingue, page_block_images.credits) Rendu : - 1 image →
simple - N images → Swiper avec navigation prev/next #} {% set images = block.images ?? [] %} {% set count = images | length %} {% set blockSlug = block.anchor_key %} {% if count == 1 %} {% set image = images[0] %}
{{ image.alt ?? '' }} {% if image.caption is not empty or image.credits is not empty %}
{% if image.caption is not empty %} {{ image.caption }} {% endif %} {% if image.credits is not empty %} {{ image.credits }} {% endif %}
{% endif %}
{% elseif count > 1 %}
{% for image in images %}
{{ image.alt ?? '' }} {% if image.caption is not empty or image.credits is not empty %}
{% if image.caption is not empty %} {{ image.caption }} {% endif %} {% if image.credits is not empty %} {{ image.credits }} {% endif %}
{% endif %}
{% endfor %}
{% endif %}