{# app/templates/platform/sections/_cta.html #} {# Call-to-action section partial with multi-language support #} {# Parameters: - cta: CTASection object (or dict) - lang: Current language code - default_lang: Fallback language #} {% macro render_cta(cta, lang, default_lang) %} {% if cta and cta.enabled %}
{# Title #} {% set title = cta.title.translations.get(lang) or cta.title.translations.get(default_lang) or '' %} {% if title %}

{{ title }}

{% endif %} {# Subtitle #} {% if cta.subtitle and cta.subtitle.translations %} {% set subtitle = cta.subtitle.translations.get(lang) or cta.subtitle.translations.get(default_lang) %} {% if subtitle %}

{{ subtitle }}

{% endif %} {% endif %} {# Buttons #} {% if cta.buttons %}
{% for button in cta.buttons %} {% set btn_text = button.text.translations.get(lang) or button.text.translations.get(default_lang) or '' %} {% if btn_text and button.url %} {{ btn_text }} {% if button.style == 'primary' %} {% endif %} {% endif %} {% endfor %}
{% endif %}
{% endif %} {% endmacro %}