{% extends "_layouts/main.html" %} {% import 'macros.twig' as macros %} {% block main %} {# ========================= SEC 1 — INTRO funds_section_1: - section_title (RTE) ========================= #} {% set sec1 = entry.funds_section_1.one() ?? null %} {% if sec1 %}

{{ sec1.section_title ? macros.limpar_paragrafos(sec1.section_title) : macros.limpar_paragrafos(entry.title) }}

{% endif %} {# ========================= SEC 2 — FUNDOS funds_section_2: - section_title (RTE) - text (RTE) - image (asset) - image_2 (asset) - section_title_2 (RTE) - text_2 (RTE) ========================= #} {% set sec2 = entry.funds_section_2.one() ?? null %} {% if sec2 %} {% set sec2_img = sec2.image.one() ?? null %} {% set sec2_img_2 = sec2.image_2.one() ?? null %}
{% if sec2.section_title %}

{{ macros.limpar_paragrafos(sec2.section_title) }}

{% endif %} {% if sec2.text %}
{{ sec2.text }}
{% endif %}
{% if sec2_img %} {{ sec2_img.title }} {% endif %} {% if sec2_img_2 %} {{ sec2_img_2.title }} {% endif %}
{% if sec2.section_title_2 %}

{{ macros.limpar_paragrafos(sec2.section_title_2) }}

{% endif %} {% if sec2.text_2 %}
{{ sec2.text_2 }}
{% endif %}
{% endif %} {# ========================= SEC 3 — ESTRATÉGIA DE INVESTIMENTO funds_section_3: - section_title (RTE) - btn_text (plain text) - btn_link (entry link) - cards (matriz: um campo de texto por card) — nº auto via loop.index ========================= #} {% set sec3 = entry.funds_section_3.one() ?? null %} {% if sec3 %} {% set sec3_btn_href = sec3.btn_link.url ?? (sec3.btn_link ?? '#') %}
{% if sec3.section_title %}

{{ macros.limpar_paragrafos(sec3.section_title) }}

{% endif %} {% if sec3.btn_text %} {{ macros.limpar_paragrafos(sec3.btn_text) }} {% endif %}
{% if sec3.cards|length %}
{% endif %}
{% endif %} {# ========================= SEC 4 — GALERIA (3 imagens fixas) funds_section_4: - image (asset) - image_2 (asset) - image_3 (asset) ========================= #} {% set sec4 = entry.funds_section_4.one() ?? null %} {% if sec4 %} {% set sec4_img = sec4.image.one() ?? null %} {% set sec4_img_2 = sec4.image_2.one() ?? null %} {% set sec4_img_3 = sec4.image_3.one() ?? null %}
{% if sec4_img %} {{ sec4_img.title }} {% endif %} {% if sec4_img_2 %} {{ sec4_img_2.title }} {% endif %} {% if sec4_img_3 %} {{ sec4_img_3.title }} {% endif %}
{% endif %} {# ========================= SEC 5 — CARACTERÍSTICAS GERAIS funds_section_5: - section_title (RTE) - text (RTE) - btn_text (plain text) - btn_link (entry link) - features (Table field: label + text) — loop direto, sem .all() Cabeçalho da tabela (Campo/Detalhe) via traduções. ========================= #} {% set sec5 = entry.funds_section_5.one() ?? null %} {% if sec5 %} {% set sec5_btn_href = sec5.btn_link.url ?? (sec5.btn_link ?? '#') %}
{% if sec5.section_title %}

{{ macros.limpar_paragrafos(sec5.section_title) }}

{% endif %} {% if sec5.text %}

{{ macros.limpar_paragrafos(sec5.text) }}

{% endif %} {% if sec5.btn_text %} {{ macros.limpar_paragrafos(sec5.btn_text) }} {% endif %}
{% if sec5.features|length %}

{{ 'label.campo'|t }}

{{ 'label.detalhe'|t }}

{% for row in sec5.features %} {% set row_label = row.label ?? row.col1 ?? '' %} {% set row_text = row.text ?? row.col2 ?? '' %}

{{ row_label }}

{{ row_text }}

{% endfor %}
{% endif %}
{% endif %} {# === SEC 6 — CTA DE CONTACTO === funds_section_6 (image, section_title, btn_text, btn_link) Markup no footer; conteúdo passado em _layouts/main.html via { cta_section: ... }. Nada a renderizar aqui. #} {% endblock %}