{% extends "front/"~ app.request.server.get('APP_THEME') ~"/base.html.twig" %}
{% block preload %}
{% if post.image is defined and post.image is not empty %}
{% if post.image %}
<link rel="preload" as="image" href="{{asset_image(post.image)}}" />
{% endif %}
{% endif %}
{% if galleries is defined and galleries is not empty %}
{% for item in galleries %}
{% if item.path is defined %}
<link rel="preload" as="image" href="{{asset_image_gallery(item.path)}}" />
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}
{% block stylesheets %}
{{parent()}}
{% if modele_galerie[0].type == 4 %}
<link rel="stylesheet" type="text/css" href="{{asset('templates/front/theme1/assets/plugins/flexslider/flexslider.css')}}" media="screen" >
{% endif %}
{% endblock %}
{% block body %}
{% set titre_page = post.title %}
{% if post.imageBandeau %}
{% set imagebandeau = post.imageBandeau %}
{% elseif parametre.imageBandeau %}
{% set imagebandeau = 'uploads/images/' ~ parametre.imageBandeau %}
{% else %}
{% set imagebandeau = '' %}
{% endif %}
{% if imagebandeau != '' %}
<section class="image-bandeau text-center">
<img class="lazyload" alt="{{post.title}}" title="{{post.title}}" data-srcset="{{imagebandeau}}" src="{{asset(imagebandeau)}}" />
<div class="cnt-bandeau text-center">
<div class="container-fluid wrapper">
<ol class="breadcrumb d-flex justify-content-center" itemscope itemtype="http://schema.org/BreadcrumbList">
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('index_page_home')}}" itemprop="item"><span itemprop="name">{{title_home_ariane|raw}}</span></a><meta itemprop="position" content="1" /></li>
{% set niveau = 2 %}
{% if categorieTree %}
{% for item in categorieTree %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('page',{slug:item.slug})}}" title="{{item.titre|replace({'<span>':' ','</span>':' '})}}" itemprop="item"><span itemprop="name">{{item.titre|raw}}</span></a><meta itemprop="position" content="2" /></li>
{% set niveau = 3 %}
{% if item.child is defined %}
{% for item in item.child %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('page',{slug:item.slug})}}" title="{{item.titre|replace({'<span>':' ','</span>':' '})}}" itemprop="item"><span itemprop="name">{{item.titre|raw}}</span></a><meta itemprop="position" content="3" /></li>
{% set niveau = 4 %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">{% if post.breadcrumb is not empty %}{{post.breadcrumb}}{% else %}{{post.title|raw}}{% endif %}</span><meta itemprop="position" content="{{niveau}}" /></li>
</ol>
<h1 class="page-title">{{post.title|raw}}</h1>
</div>
</div>
</section>
{% endif %}
{% set bgimage = post.imageCouverture ? post.imageCouverture : "" %}
<div class="page_cms pt-5" {% if bgimage %}style="background-image:url('{{bgimage}}');background-repeat: no-repeat;background-size:cover;"{% endif %} >
{% if imagebandeau == '' %}
<div class="breadcrumb-style-default">
<div class="container-fluid wrapper">
<div class="row">
<div class="col-lg-12">
<div class="inner text-center">
<ol class="breadcrumb d-flex justify-content-center" itemscope itemtype="http://schema.org/BreadcrumbList">
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('index_page_home')}}" itemprop="item"><span itemprop="name">{{title_home_ariane|raw}}</span></a><meta itemprop="position" content="1" /></li>
{% set niveau = 2 %}
{% if categorieTree %}
{% for item in categorieTree %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('page',{slug:item.slug})}}" title="{{item.titre|replace({'<span>':' ','</span>':' '})}}" itemprop="item"><span itemprop="name">{{item.titre|raw}}</span></a><meta itemprop="position" content="2" /></li>
{% set niveau = 3 %}
{% if item.child is defined %}
{% for item in item.child %}
<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('page',{slug:item.slug})}}" title="{{item.titre|replace({'<span>':' ','</span>':' '})}}" itemprop="item"><span itemprop="name">{{item.titre|raw}}</span></a><meta itemprop="position" content="3" /></li>
{% set niveau = 4 %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">{% if post.breadcrumb is not empty %}{{post.breadcrumb}}{% else %}{{post.title|raw}}{% endif %}</span><meta itemprop="position" content="{{niveau}}" /></li>
</ol>
<h1 class="page-title">{{post.title|raw}}</h1>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% if post.summary != "" or post.image is not empty or post.content != "" or galleries is not empty or post.urlvideo is not empty %}
<section class="content-page">
<div class="container-fluid wrapper mt-3">
<div id="post-{{post.id}}" class="bloc-texte-principal gx-5 py-2">
{% if post.summary is not empty and post.summary != "" and (post.positionimage != 2 and post.positionimage != 3) %}
<div class="col-sm-12 text-center">
<h2 class="sub-title wow">{{post.summary|raw}}</h2>
</div>
{% endif %}
{% set position_image = post.positionimage %}
{% set class_position = "" %}
{% if post.positionimage == 2 %}
{% set class_position = "float-md-left mb-2 mr-md-3" %}
{% elseif post.positionimage == 3 %}
{% set class_position = "float-md-right mb-2 ml-md-3" %}
{% endif %}
{% if post.image and post.image is not empty %}
<div class="col-image-post text-center my-4 {{class_position}}">
<img class="lazyload img-fluid principal-img" src="{{asset_image(post.image)}}" alt="{{post.title|raw}}" />
</div>
{% endif %}
{% if post.content is not empty and post.content != "" %}
<div class="content_post">
{% if post.summary is not empty and post.summary != "" and (post.positionimage == 2 or post.positionimage == 3) %}
<div class="col-sm-12">
<h2 class="sub-title wow">{{post.summary|raw}}</h2>
</div>
{% endif %}
{% set lien_site = "<a href="~url_site()~" title="~parametre.titre~">"~url_site()~"</a>" %}
<div class="texte-content">{{post.content|replace({'[NDD]':lien_site})|raw}}</div>
{% if post.typelien == null %}
{% if categorieTree is defined and categorieTree[0] is defined %}
<div class="text-center py-2">
<a href="{{path('page',{slug:categorieTree[0].slug})}}" class="btn btn-cms py-3 px-5 mt-3 btn-plus">Retour à la liste {{categorieTree[0].titre}}</a>
</div>
{% endif %}
{% elseif post.typelien != 1 %}
{% if post.typelien == '4' %}
<div class="text-center py-2">
<a href="tel:{{post.telephone}}" class="btn btn-cms py-3 px-5 mt-3 btn-plus">{{post.titrelien}}</a>
</div>
{% elseif post.typelien == '2' %}
<div class="text-center py-2">
<a href="{{slug_link_interne(post.lieninterne)}}" class="btn btn-cms py-3 px-5 mt-3 btn-plus">{{post.titrelien}}</a>
</div>
{% elseif post.typelien == '3' %}
<div class="text-center py-2">
<a href="{{post.lienexterne}}" target="_blank" class="btn btn-cms py-3 px-5 mt-3 btn-plus">{{post.titrelien}}</a>
</div>
{% endif %}
{% endif %}
{# autres articles associés #}
{% if all_others_posts_associes is defined and all_others_posts_associes is not empty %}
<div class="others-posts mt-3">
{% for item in all_others_posts_associes %}
<div class="other-post">
<a class="article-titre" href="{{item.slug == "home" ? "/" : item.slug}}" title="{{item.title|raw}}">{{item.title|raw}}</a>
</div>
{% endfor %}
</div>
{% endif %}
{# fin autres articles associés #}
{% if docs and docs is not empty %}
<div class="col-md-12 bloc-docs d-flex justify-content-center">
{% for doc in docs %}
<a class="btn-back-pulse m-2" href="{{doc.location ~ doc.path ~ '/' ~ doc.fileName}}" title="{{doc.titre}}" target="_blank"><i class="fa fa-file-pdf-o mr-2"></i>{{doc.titre}}</a>
{% endfor %}
</div>
{% endif %}
{# Debut champs personnalisés#}
{% if champsPersonnalisesPost is defined and champsPersonnalisesPost is not empty %}
<div class="sx-social-icons mt-3 col-md-12 text-center">
{% for champ_personnalise_post in champsPersonnalisesPost %}
{% if champ_personnalise_post.value != "" %}
{% if champ_personnalise_post.type == "link" %}
{% if champ_personnalise_post.alias == "lien-instagram" %}
<a href="{{champ_personnalise_post.value}}" title="champ_personnalise_post.label" target="_blank"><i class="fa fa-instagram"></i></a>
{% endif %}
{% if champ_personnalise_post.alias == "lien-linkedin" %}
<a href="{{champ_personnalise_post.value}}" title="champ_personnalise_post.label" target="_blank"><i class="fa fa-linkedin"></i></a>
{% endif %}
{% if champ_personnalise_post.alias == "lien-facebook" %}
<a href="{{champ_personnalise_post.value}}" title="champ_personnalise_post.label" target="_blank"><i class="fa fa-facebook"></i></a>
{% endif %}
{% if champ_personnalise_post.alias == "lien-email" %}
<a href="mailto:{{champ_personnalise_post.value}}" title="champ_personnalise_post.label" target="_blank"><i class="fa fa-envelope"></i></a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</div>
{% endif %}
{# Fin champs personnalisés#}
</div>
{% endif %}
</div>
</div>
<div class="clearfix"></div>
{# {% if galleries and galleries is not empty %}
{{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/galleries.html.twig',{galleries: galleries,post:post}, with_context = false)}}
{% endif %} #}
{% if galleries and galleries is not empty and template_model_gallerie is defined and template_model_gallerie is not empty %}
{{ include(template_from_string(template_model_gallerie)) }}
{% endif %}
{% if post.urlvideo is not empty %}
<div class="container-fluid wrapper mt-3">
<div class="col-md-12 mt-1">
<div class="video">
{% set id_video_externe = post.urlvideo|split('?v=')[1] %}
<a class="video-thumbnail m-0" href="{{post.urlvideo}}" data-fancybox="video">
<img src="https://img.youtube.com/vi/{{id_video_externe}}/maxresdefault.jpg" class="img-fluid" alt=""/>
</a>
</div>
</div>
</div>
{% endif %}
</section>
{% endif %}
{# article associer #}
{% if all_posts_associes is defined and all_posts_associes is not empty %}
<section class="">
<div class="container-fluid mt-3">
<div class="row gx-5 py-2">
<div class="col-sm-12 text-center">
{% if parametre.titreArticleAssocier %}
<h2 class="sub-title wow">{{parametre.titreArticleAssocier}}</h2>
{% endif %}
</div>
<div class="col-sm-12">
<div class="list_blocs pos1">
<div class="blocs">
<section class="results dynam-affichage affichage1 type_affiche3 ">
{% for item in all_posts_associes %}
{% set duree = 0.1 %}
{% for item_one in item %}
{% set image_item = item_one.image != null? asset_image(item_one.image): null %}
{% set image_item = image_item != null? image_item :asset('uploads/images/' ~ parametre.imagevide) %}
<div class="article wow zoomIn animated" data-wow-delay="{{duree}}s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">
<span class="article-image lazyloaded" style="background-image: url({{image_item}}); background-size: cover; background-position: center center; background-repeat: no-repeat;"> </span>
<span class="article-cnt">
{% if item_one.title %}
<a class="article-titre" href="{{item_one.slug}}" title="{{item_one.title|raw}}">{{item_one.title|raw}}</a>
{% endif %}
{% if item_one.summary is not empty %}
<span class="article-txt">
{{item_one.summary|raw}}
</span>
{% else %}
<span class="article-txt">
{% if item_one.content != "" %}
{{cutText(item_one.content)|raw}}
{% endif %}
</span>
{% endif %}
<span class="article-bts">
<button class="article-plus btn-fade" onclick="window.open('{{item_one.slug}}', '_self');" title="En savoir plus">En savoir plus</button>
</span>
</span>
</div>
{% endfor %}
{% set duree = duree + 0.2 %}
{% endfor %}
</section>
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{# fin article associer #}
{% if blocs is defined %}
{% for bloc in blocs.Bloc %}
{% if is_mobile() and bloc.mobile == true %}
{{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc.html.twig',{
bloc: bloc,
product_interesse:product_interesse,
annonce_interesse:annonce_interesse,
}, with_context = false)}}
{% endif %}
{% if is_full_view() and is_mobile() == false and bloc.desktop == true %}
{{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc.html.twig',{
bloc: bloc,
product_interesse:product_interesse,
annonce_interesse:annonce_interesse,
}, with_context = false)}}
{% endif %}
{% endfor %}
{% endif %}
{% if ref_pages_principal is defined and ref_pages_principal is not empty %}
<section class="bg-section-ref">
<div class="container-fluid mt-3">
<div class="row gx-5 py-2">
<div class="col-sm-12 text-center">
<h2 class="sub-title wow">{{parametreRef.titreblocactivitearticle|default('')}} </h2>
</div>
<div class="col-sm-12">
<div class="list_blocs pos1">
<div class="blocs">
<section class="results dynam-affichage affichage1 type_affiche3">
{% for item in ref_pages_principal %}
{% set duree = 0.1 %}
{% set image_item = item.image != null? asset_image(item.image):'uploads/images/' ~ parametre.imagevide %}
<div class="article wow zoomIn animated" data-wow-delay="{{duree}}s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">
<span class="article-image lazyloaded" style="background-image: url({{image_item}}); background-size: cover; background-position: center center; background-repeat: no-repeat;"> </span>
<span class="article-cnt">
<a class="article-titre" href="{{path('page',{slug:item.slug})}}" title="" >{{item.title}}</a>
<span class="article-txt">
{% if item.summary is not empty %}
{{item.summary|raw}}
{% else %}
{{cutText(item.content)|raw}}
{% endif %}
</span>
<span class="article-bts">
<button class="article-plus btn-fade" onclick="window.open('{{path('page',{slug:item.slug})}}', '_self');" title="En savoir plus">En savoir plus</button>
</span>
</span>
</div>
{% set duree = duree + 0.2 %}
{% endfor %}
</section>
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if ref_pages_secondaire is defined and ref_pages_secondaire is not empty %}
<section class="{{ref_pages_principal is defined and ref_pages_principal is empty?'bg-section-ref':''}}">
<div class="container-fluid mt-3">
<div class="row gx-5 py-2">
<div class="col-sm-12 text-center">
<h2 class="sub-title wow">{{parametreRef.titreblocsousactivitearticle|default('')}}</h2>
</div>
<div class="col-sm-12">
<div class="list_blocs pos1">
<div class="blocs">
<section class="results dynam-affichage affichage1 type_affiche3">
{% for item in ref_pages_secondaire %}
{% set duree = 0.1 %}
{% set image_item = item.image != null? asset_image(item.image):'uploads/images/' ~ parametre.imagevide %}
<div class="article wow zoomIn animated" data-wow-delay="{{duree}}s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">
<span class="article-image lazyloaded" style="background-image: url({{image_item}}); background-size: cover; background-position: center center; background-repeat: no-repeat;"> </span>
<span class="article-cnt">
<a class="article-titre" href="{{path('page',{slug:item.slug})}}" title="" >{{item.title}}</a>
<span class="article-txt">
{% if item.summary is not empty %}
{{item.summary|raw}}
{% else %}
{{cutText(item.content)|raw}}
{% endif %}
</span>
<span class="article-bts">
<button class="article-plus btn-fade" onclick="window.open('{{path('page',{slug:item.slug})}}', '_self');" title="En savoir plus">En savoir plus</button>
</span>
</span>
</div>
{% set duree = duree + 0.2 %}
{% endfor %}
</section>
</div>
</div>
</div>
</div>
</div>
</section>
{% endif %}
{% if next_article is defined and next_article is not empty or prev_article is defined and prev_article is not empty %}
<div class="container-fluid wrapper mt-3">
<div class="row gx-5 py-4">
<div class="col-lg-12 d-flex justify-content-between">
<div class="">
{% if prev_article is defined and prev_article is not empty %}
<a href="{{path('page',{'slug':prev_article.slug})}}" title="{{prev_article.title|replace({'<span>':' ','</span>':' '})}}"><span class="signe1"><i class="fa fa-arrow-left"></i></span> {{prev_article.title|raw}}</a>
{% endif %}
</div>
<div class="">
{% if next_article is defined and next_article is not empty %}
<a href="{{path('page',{'slug':next_article.slug})}}" title="{{next_article.title|replace({'<span>':' ','</span>':' '})}}">{{next_article.title|raw}} <span class="signe1"><i class="fa fa-arrow-right"></i></span></a>
{% endif %}
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{parent()}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
{% if modele_galerie[0].type == 4 %}
{{parent()}}
<script src="{{asset('templates/front/theme1/assets/plugins/flexslider/jquery.flexslider.js')}}" ></script>
<script>
/*-------------------------------------------------*/
/* = Sx flexslider
/*-------------------------------------------------*/
if ($(".sx_flexslider").length) {
$('.flex-carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: true,
slideshow: false,
itemWidth: 150,
asNavFor: '.flex-slider'
});
$('.flex-slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: true,
slideshow: false,
sync: ".flex-carousel"
});
}
</script>
{% endif %}
{% endblock %}