{# Section partial: Image Gallery #} {# Parameters: - gallery: dict with enabled, title, images (list of {src, alt, caption}) - lang: Current language code - default_lang: Fallback language #} {% macro render_gallery(gallery, lang, default_lang) %} {% if gallery and gallery.enabled %}
{# Section header #}
{% set title = gallery.title.translations.get(lang) or gallery.title.translations.get(default_lang) or '' %} {% if title %}

{{ title }}

{% endif %}
{# Image grid #} {% if gallery.images %}
{% for image in gallery.images %}
{{ image.alt or '' }} {% if image.caption %}

{{ image.caption }}

{% endif %}
{% endfor %}
{% endif %}
{% endif %} {% endmacro %}