{% extends 'admin/_layout.html.twig' %} {% block title %}{{ seo.pageLabel }} — SEO — Admin{% endblock %} {% block page_title %}{{ seo.pageLabel }}{% endblock %} {% block page_subtitle %}Fiche SEO{% endblock %} {% block admin_body %}
{# ── Infos ── #}

Informations

Route {{ seo.routeName }}
Catégorie {% if seo.pageCategory == 'public' %} Public {% elseif seo.pageCategory == 'auth' %} Auth {% else %} Legal {% endif %}
Title {{ seo.title ?? '—' }}
{% if seo.pageCategory != 'auth' %}
Meta description {{ seo.metaDescription ?? '—' }}
Robots {{ seo.robots }}
URL canonique {{ preview.canonicalUrl ?? 'Auto' }}
{% endif %}
Sitemap {% if seo.sitemapInclude %} Inclus — priorité {{ seo.sitemapPriority }}, {{ seo.sitemapChangefreq }} {% else %} Exclu {% endif %}
Mis à jour {{ seo.updatedAt ? seo.updatedAt|date('d/m/Y à H:i') : '—' }}
Modifier Retour
{# ── Previews ── #}
{# Google preview #}

Aperçu Google

{{ preview.title ?? seo.pageLabel }}
{{ preview.canonicalUrl ?? '...' }}
{{ preview.metaDescription ?? 'Aucune description définie.' }}
{% if seo.pageCategory == 'public' %} {# OG / Social preview #}

Aperçu réseaux sociaux

{% set ogImg = preview.ogImageUrl %} {% if ogImg %} {% set ogImgSrc = ogImg starts with 'http' ? ogImg : asset(ogImg) %}
{% else %}
Pas d'image OG
{% endif %}
{{ preview.canonicalUrl|split('//')|last|split('/')|first }}
{{ preview.ogTitle ?? preview.title ?? seo.pageLabel }}
{{ preview.ogDescription ?? preview.metaDescription ?? '' }}
{# Twitter Card preview #}

Aperçu Twitter Card

{% set twImg = preview.twImageUrl %} {% if twImg %} {% set twImgSrc = twImg starts with 'http' ? twImg : asset(twImg) %} {% else %} {% set twImgSrc = null %} {% endif %}
{% if twImgSrc %}
{% else %}
Pas d'image Twitter
{% endif %}
{{ preview.twTitle ?? preview.ogTitle ?? seo.pageLabel }}
{{ preview.twDescription ?? preview.ogDescription ?? '' }}
{% if seo.twSite %}
{{ seo.twSite }}
{% endif %}
Card type {{ seo.twCard }}
@site {{ seo.twSite ?? '—' }}
{% endif %}
{% endblock %}