{% set catAgdTrouve = 0 %}
{% set mediaTmpOg = '' %}
{% if agendas is defined and catEnCours is defined and catEnCours is not null and catEnCours > 0 %}
{% for cat in categories %}
{% if cat.id == catEnCours and cat["agd_cat_bandeau"] %}
{% set catAgdTrouve = 1 %}
{% set mediaTmpOg = "agenda/"~cat["agd_cat_bandeau"] %}
{% endif %}
{% endfor %}
{% endif %}
{% set catAnnuTrouve = 0 %}
{% if annuaire is defined and isListe is defined and catEnCours is defined and catEnCours is not null and catEnCours.getId() > 0 and catEnCours.getAbcHeadband() is not null and catEnCours.getAbcHeadband() != "" %}
{% set catAnnuTrouve = 1 %}
{% set mediaTmpOg = "annuaire/"~catEnCours.getAbcHeadband() %}
{% endif %}
{% set mediaTmpCataOg = '' %}
{% if actualite is defined and actualite.actIllustrationFichier %}
{% set mediaTmpOg = 'actualite/'~actualite.actIllustrationFichier %}
{% elseif actualites is defined and catEnCours is defined and catEnCours is not null and catEnCours > 0 and categories[catEnCours].actCatBandeau %}
{% set mediaTmpOg = 'actualite/'~categories[catEnCours].actCatBandeau %}
{% elseif agenda is defined and agenda.agdIllustrationFichier %}
{% set mediaTmpOg = 'agenda/'~agenda.agdIllustrationFichier %}
{% elseif ficheWithCategories is defined and fiche.getAbThumbnail() %}
{% set mediaTmpOg = 'annuaire/'~fiche.getAbThumbnail() %}
{% elseif document is defined and document.docIllustration %}
{% set mediaTmpOg = 'documents/'~document.docIllustration %}
{% elseif documents is defined and catEnCours is defined and catEnCours is not null and catEnCours.docCatBandeau %}
{% set mediaTmpOg = 'documents/'~catEnCours.docCatBandeau %}
{% elseif page.pbandeau is defined and page.pbandeau is not null and page.pbandeau != "" %}
{% set mediaTmpOg = 'pages/'~page.pbandeau %}
{% elseif catAnnuTrouve==0 or catAgdTrouve==0 %}
{% set mediaTmpOg = 'siteImg.jpg' %}
{% endif %}
{% set mediaTmpOg = 'siteImg.jpg' %}
<meta property="og:image" content="{{ websiteroot }}{{ asset("medias_front/"~mediaTmpOg|default(mediaDefaultOg)) }}">
<meta property="og:title" content="{% block titleOg %}{{ titleSite }}{% endblock %}"/>
<meta property="og:url" content="{{ urlPage }}"/>
<meta property="og:description" content="{% block metaDescriptionOg %}{{ descriptionSite }}{% endblock %}"/>
<meta property="og:type" content="website"/>