{# app/templates/platform/sections/_products.html #} {# Products/offerings section for multi-product platforms (e.g. wizard.lu) #} {# Parameters: - products: ProductsSection object (or dict) - lang: Current language code - default_lang: Fallback language #} {% macro render_products(products, lang, default_lang) %} {% if products and products.enabled %}
{# Section header #}
{% set title = products.title.translations.get(lang) or products.title.translations.get(default_lang) or '' %} {% if title %}

{{ title }}

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

{{ subtitle }}

{% endif %} {% endif %}
{# Product cards #} {% if products.products %}
{% for product in products.products %}
{# Badge #} {% if product.badge and product.badge.translations %} {% set badge_text = product.badge.translations.get(lang) or product.badge.translations.get(default_lang) %} {% if badge_text %}
{{ badge_text }}
{% endif %} {% endif %} {# Icon #} {% if product.icon %}
{% endif %} {# Title #} {% set product_title = product.title.translations.get(lang) or product.title.translations.get(default_lang) or '' %} {% if product_title %}

{{ product_title }}

{% endif %} {# Description #} {% set product_desc = product.description.translations.get(lang) or product.description.translations.get(default_lang) or '' %} {% if product_desc %}

{{ product_desc }}

{% endif %} {# CTA Link #} {% if product.url %} {% set link_label = (product.link_text.translations.get(lang) if product.link_text and product.link_text.translations else none) or (product.link_text.translations.get(default_lang) if product.link_text and product.link_text.translations else none) or 'Learn More' %} {{ link_label }} {% endif %}
{% endfor %}
{% endif %}
{% endif %} {% endmacro %}