{# Patrimoine section — dark/brown band with a mountain-mask top edge, image + title/subtitle/text + CTA. Shared by expertise.html.twig and projects/list.html.twig (both templates store the same flat patrimoine*/patrimoineImage/patrimoineButton* content keys). Params: - content (array, required): the page's content array (patrimoineTitle, patrimoineSubtitle, patrimoineText, patrimoineImage, patrimoineButtonLabel, patrimoineButtonHref) - imagePath (string, default ''): resolved URL for content.patrimoineImage (a Media UUID — resolved by AbstractPageEnricher::enrichMediaReferences() into `patrimoineImagePath`) - imageDarkPath (string, default ''): resolved URL for content.patrimoineImageDark (Hiver) - edit_mode (bool, default false): wraps fields with inline-edit data attributes #}
{% if edit_mode|default(false) and not (content.patrimoineImage|default(false) or content.patrimoineImageDark|default(false)) %} + Ajouter une image {% endif %} {% include 'components/_themed_img.html.twig' with {light: imagePath|default(''), dark: imageDarkPath|default(''), alt: '', class: 'patrimoine-section__img'} only %}
{% if (content.patrimoineTitle is defined and content.patrimoineTitle) or edit_mode|default(false) %}

{{ content.patrimoineTitle|default('') }}

{% endif %} {% if (content.patrimoineSubtitle is defined and content.patrimoineSubtitle) or edit_mode|default(false) %}

{{ content.patrimoineSubtitle|default('') }}

{% endif %} {% if (content.patrimoineText is defined and content.patrimoineText) or edit_mode|default(false) %}
{{ content.patrimoineText|default('')|raw }}
{% endif %} {% set patrimoineButtonLabel = content.patrimoineButtonLabel|default('') %} {% if (content.patrimoineButtonHref is defined and content.patrimoineButtonHref and patrimoineButtonLabel) or edit_mode|default(false) %} {% set patrimoineButtonContent %}{{ patrimoineButtonLabel|default('Découvrir en détail') }} {% endset %} {{ include('components/_button.html.twig', edit_mode|default(false) ? { href: content.patrimoineButtonHref|default('#'), content: patrimoineButtonContent, extra_class: 'patrimoine-section__cta link-btn--on-content', attrs: 'data-editable-href="true" data-field="patrimoineButtonHref" data-label-field="patrimoineButtonLabel" data-label-value="' ~ patrimoineButtonLabel|e('html_attr') ~ '"' } : { href: content.patrimoineButtonHref, content: patrimoineButtonContent, extra_class: 'patrimoine-section__cta' }) }} {% endif %}