{% extends 'admin/base_admin.html.twig' %} {# Carte générique : une section de content_blocks, un champ par feuille. #} {% macro block_card(section, note, style) %}

{{ section.label }}

{% if note %}

{{ note }}

{% endif %} {% for f in section.fields %} {% endfor %}
{% endmacro %} {% block title %}Page{% endblock %} {% block breadcrumb %}Pages / {{ page.slug }}{% endblock %} {% block content %} {% import _self as ui %} {% set b = page.contentBlocks ?? {} %} {# La grille d'images n'existe que sur le gabarit infographie (S-2xx). #} {% set show_realisations = page.slug == 'infographie-en-guadeloupe' or b.infographie_realisations is defined %} {% set show_avis = page.slug == 'accueil' or b.avis_google is defined %}

/{{ page.slug }}

Annuler Prévisualiser
{# HERO — carte générique #} {% if sections.hero is defined %} {{ ui.block_card(sections.hero) }} {% endif %} {# STATS — chiffres clés (cards + drag & drop), liste répétable #}

Chiffres clés

Glissez pour réordonner.

{% for s in b.stats ?? [] %}
⠿
{% endfor %}
{# FAQ — accordéon + drag & drop, liste répétable #}

FAQ

Cliquez une question pour déplier sa réponse. Glissez pour réordonner.

{% for f in b.faq ?? [] %}
⠿
{% endfor %}
{# AVIS GOOGLE — le carrousel de l'accueil (auteur, rôle, date, texte) #} {% if show_avis %}

Avis Google

Collez ici les avis à afficher sur l’accueil. Cliquez un nom pour déplier son texte, glissez pour réordonner. La note et le nombre d’avis se règlent dans Paramètres → Contact.

{% for a in b.avis_google ?? [] %}
⠿
{% endfor %}
{% endif %} {# RÉALISATIONS — une image + un titre, liste répétable (page infographie) #} {% if show_realisations %}

Réalisations (images)

Une image et un titre par réalisation — le titre s’affiche au survol. Glissez pour réordonner. Une ligne sans image n’est pas enregistrée.

{% for r in realisations %}
⠿ {% if r.url %}{% else %}image manquante{% endif %}
{% endfor %}
{% endif %} {# Toutes les autres sections de content_blocks, automatiquement #} {% for key, section in sections %} {% if key not in ['hero', 'cta'] %} {% if key == 'geo' %} {{ ui.block_card(section, 'Generative Engine Optimization. Le HTML simple (, ) est autorisé dans le titre.') }} {% else %} {{ ui.block_card(section) }} {% endif %} {% endif %} {% endfor %}
{# MÉTA / SEO #}

SEO & statut

{# CTA FINAL — carte générique #} {% if sections.cta is defined %} {{ ui.block_card(sections.cta, null, '') }} {% endif %}
{# Gabarits pour l'ajout de lignes #} {% if show_avis %} {% endif %} {% if show_realisations %} {% endif %} {% endblock %}