{% extends "front/"~ app.request.server.get('APP_THEME') ~"/base.html.twig" %}
{% block preload %}
{% if categorie.image is defined and categorie.image is not empty %}
<link rel="preload" as="image" href="{{asset_image(categorie.image)}}" />
{% endif %}
{% if resultats is defined and resultats is not empty %}
{% for item in resultats %}
{% if item.image %}
<link rel="preload" as="image" href="{{asset_image(item.image)}}" />
{% endif %}
{% endfor %}
{% 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(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 %}
{% if template.css is defined %}
<style>
{{template.css|raw}}
</style>
{% endif %}
{% endblock %}
{% block body %}
{% if categorie.imageBandeau %}
{% set imagebandeau = categorie.imageBandeau %}
{% elseif parametre.imageBandeau %}
{% set imagebandeau = 'uploads/images/' ~ parametre.imageBandeau %}
{% else %}
{% set imagebandeau = '' %}
{% endif %}
{% if imagebandeau != '' %}
<section class="image-bandeau text-center">
<img alt="{{categorie.titrecategorie}}" title="{{categorie.titrecategorie}}" 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">Accueil</span></a><meta itemprop="position" content="1" /></li>
{% if categorieParent is defined %}<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('page',{slug:categorieParent.slugurl})}}" title="{{categorieParent.titrecategorie}}" itemprop="item"><span itemprop="name">{{categorieParent.titrecategorie}}</span></a><meta itemprop="position" content="2" /></li>{% endif %}
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">{{categorie.titrecategorie}}</span><meta itemprop="position" content="3" /></li>
</ol>
<h1 class="page-title titre_page_mention">{{categorie.titrecategorie}}</h1>
</div>
</div>
</section>
{% endif %}
<div class="page_cms pt-5">
{% if imagebandeau == '' %}
<div class="container-fluid wrapper">
<div class="breadcrumb-style-default">
<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">Accueil</span></a><meta itemprop="position" content="1" /></li>
{% if categorieParent is defined %}<li class="breadcrumb-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{path('page',{slug:categorieParent.slugurl})}}" title="{{categorieParent.titrecategorie}}" itemprop="item"><span itemprop="name">{{categorieParent.titrecategorie}}</span></a><meta itemprop="position" content="2" /></li>{% endif %}
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">{{categorie.titrecategorie}}</span><meta itemprop="position" content="3" /></li>
</ol>
<h1 class="page-title titre_page_mention">{{categorie.titrecategorie}}</h1>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% set position_texte = "" %}
{% if categorie.positiontext == 3 %}
{% set position_texte = "pos3" %}
{% elseif categorie.positiontext == 2 %}
{% set position_texte = "pos2" %}
{% else %}
{% set position_texte = "pos1" %}
{% endif %}
{% set type_affiche = "" %}
{% if categorie.nombrearticle == 1 %}
{% set type_affiche = "type_affiche1" %}
{% elseif categorie.nombrearticle == 2 %}
{% set type_affiche = "type_affiche2" %}
{% else %}
{% set type_affiche = "type_affiche3" %}
{% endif %}
{% if categorie.actif_slider == 1 %}
{% set type_affiche = type_affiche ~ " owl-carousel" %}
{% endif %}
{% if categorie.multi_affichage == 1 %}
{% set multi_affichage = "affichage1" %}
{% elseif categorie.multi_affichage == 2 %}
{% set multi_affichage = "affichage2" %}
{% elseif categorie.multi_affichage == 3 %}
{% set multi_affichage = "affichage3" %}
{% elseif categorie.multi_affichage == 4 %}
{% set multi_affichage = "affichage4" %}
{% elseif categorie.multi_affichage == 5 %}
{% set multi_affichage = "affichage5" %}
{% elseif categorie.multi_affichage == 6 %}
{% set multi_affichage = "affichage6" %}
{% elseif categorie.multi_affichage == 7 %}
{% set multi_affichage = "affichage7" %}
{% elseif categorie.multi_affichage == 8 %}
{% set multi_affichage = "affichage8" %}
{% elseif categorie.multi_affichage == 9 %}
{% set multi_affichage = "affichage9" %}
{% elseif categorie.multi_affichage == 10 %}
{% set multi_affichage = "affichage10" %}
{% elseif categorie.multi_affichage == 11 %}
{% set multi_affichage = "affichage11" %}
{% endif %}
{% if categorie.actif_haut == 1 and categorie.positiontext != 2 and categorie.positiontext != 3 %}
<div class="container-fluid wrapper">
<div class="row mb-3 mt-2">
{% if categorie.chapeaucategorie !='' %}
<div class="col-sm-12 text-center mb-1">
<h2 class="sub-title">{{categorie.chapeaucategorie}}</h2>
</div>
{% endif %}
{% if categorie.image is defined and categorie.image is not empty %}
<div class="col-lg-12 py-5 d-flex justify-content-center">
<div class="col-sm-12 col-md-6">
<img class="img-fluid" src="{{asset_image(categorie.image)}}" alt="{{categorie.titrecategorie}}" />
</div>
</div>
{% endif %}
{% if categorie.textecategorie is not empty and categorie.textecategorie != " " %}
<div class="col-lg-12 content_post">
{{categorie.textecategorie|raw}}
{% if categorie.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-primary py-3 px-5 mt-3 btn-plus">Retour à la liste {{categorieTree[0].titre}}</a>
</div>
{% endif %}
{% elseif categorie.typelien != 1 %}
{% if categorie.typelien == '4' %}
<div class="text-center py-2">
<a href="tel:{{categorie.telephone}}" class="btn btn-primary py-3 px-5 mt-3 btn-plus">{{categorie.titrelien}}</a>
</div>
{% elseif categorie.typelien == '2' %}
<div class="text-center py-2">
<a href="{{categorie.lieninterne}}" class="btn btn-primary py-3 px-5 mt-3 btn-plus">{{categorie.titrelien}}</a>
</div>
{% elseif categorie.typelien == '3' %}
<div class="text-center py-2">
<a href="{{categorie.lienexterne}}" class="btn btn-primary py-3 px-5 mt-3 btn-plus">{{categorie.titrelien}}</a>
</div>
{% endif %}
{% endif %}
</div>
{% endif %}
{% 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.fileName|slice(0, -4)}}" target="_blank"><i class="fa fa-file-pdf-o mr-2"></i>{{doc.fileName|slice(0, -4)}}</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% endif %}
<div class="list_blocs {{position_texte}}">
{% if categorie.actif_haut != 1 and categorie.positiontext != 1 %}
<div class="cnt_blocs">
{% if categorie.chapeaucategorie !='' %}
<div class="col-sm-12 text-center mb-1">
<h2 class="sub-title">{{categorie.chapeaucategorie}}</h2>
</div>
{% endif %}
{% if categorie.textecategorie is not empty and categorie.textecategorie != "" %}
<div class="col-lg-12 content_post">
{{categorie.textecategorie|raw}}
{% if categorie.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-back-pulse">Retour à la liste {{categorieTree[0].titre}}</a>
</div>
{% endif %}
{% elseif categorie.typelien != 1 %}
{% if categorie.typelien == '4' %}
<div class="text-center py-2">
<a href="tel:{{categorie.telephone}}" class="btn btn-back-pulse">{{categorie.titrelien}}</a>
</div>
{% elseif categorie.typelien == '2' %}
<div class="text-center py-2">
<a href="{{categorie.lieninterne}}" class="btn btn-back-pulse">{{categorie.titrelien}}</a>
</div>
{% elseif categorie.typelien == '3' %}
<div class="text-center py-2">
<a href="{{categorie.lienexterne}}" class="btn btn-back-pulse">{{categorie.titrelien}}</a>
</div>
{% endif %}
{% endif %}
</div>
{% endif %}
{% 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.fileName|slice(0, -4)}}" target="_blank"><i class="fa fa-file-pdf-o mr-2"></i>{{doc.fileName|slice(0, -4)}}</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}
<div class="blocs">
{% if template is defined and template is not empty %}
{{ include(template_from_string(template.twig)) }}
{% endif %}
{% if pagination == true and posts.hasToPaginate %}
<div class="pagination-items">
{% set paginator = posts %}
<div class="navigation text-center">
<ul class="pagination">
{% if paginator.hasPreviousPage %}
<li class="prev"><a href="{{ path('page', {slug:categorie.slugurl,page: paginator.previousPage}) }}" rel="previous"><i class="fa fw fa-long-arrow-left"></i> {{ 'paginator.previous'|trans([],'variable') }}</a></li>
{% else %}
<li class="prev disabled"><span><i class="fa fw fa-long-arrow-left"></i> {{ 'paginator.previous'|trans([],'variable') }}</span></li>
{% endif %}
{% for i in 1..paginator.lastPage %}
{% if i == paginator.currentPage %}
<li class="active number"><span>{{ i }} </span></li>
{% else %}
<li class="number"><a href="{{ path('page', {slug:categorie.slugurl,page: i }) }}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.hasNextPage %}
<li class="next"><a href="{{ path('page', {slug:categorie.slugurl,page: paginator.nextPage}) }}" rel="next">{{ 'paginator.next'|trans([],'variable') }} <i class="fa fw fa-long-arrow-right"></i></a></li>
{% else %}
<li class="next disabled"><span>{{ 'paginator.next'|trans([],'variable')}} <i class="fa fw fa-long-arrow-right"></i></span></li>
{% endif %}
</ul>
</div>
</div>
{% endif %}
</div>
</div>
{% if categorie.actif_haut != 1 and categorie.positiontext == 1 %}
<div class="container-fluid wrapper">
<div class="row mb-3 mt-2">
{% if categorie.chapeaucategorie !='' %}
<div class="col-sm-12 text-center mb-1">
<h2 class="sub-title">{{categorie.chapeaucategorie}}</h2>
</div>
{% endif %}
{% if categorie.image is defined and categorie.image is not empty %}
<div class="col-lg-12 py-5 d-flex justify-content-center">
<div class="col-sm-12 col-md-6">
<img class="img-fluid" src="{{asset_image(categorie.image)}}" alt="{{categorie.titrecategorie}}" />
</div>
</div>
{% endif %}
{% if categorie.textecategorie is not empty and categorie.textecategorie != " " %}
<div class="col-lg-12 content_post">
{{categorie.textecategorie|raw}}
{% if categorie.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-primary py-3 px-5 mt-3 btn-plus">Retour à la liste {{categorieTree[0].titre}}</a>
</div>
{% endif %}
{% elseif categorie.typelien != 1 %}
{% if categorie.typelien == '4' %}
<div class="text-center py-2">
<a href="tel:{{categorie.telephone}}" class="btn btn-primary py-3 px-5 mt-3 btn-plus">{{categorie.titrelien}}</a>
</div>
{% elseif categorie.typelien == '2' %}
<div class="text-center py-2">
<a href="{{categorie.lieninterne}}" class="btn btn-primary py-3 px-5 mt-3 btn-plus">{{categorie.titrelien}}</a>
</div>
{% elseif categorie.typelien == '3' %}
<div class="text-center py-2">
<a href="{{categorie.lienexterne}}" class="btn btn-primary py-3 px-5 mt-3 btn-plus">{{categorie.titrelien}}</a>
</div>
{% endif %}
{% endif %}
</div>
{% 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.fileName|slice(0, -4)}}" target="_blank"><i class="fa fa-file-pdf-o mr-2"></i>{{doc.fileName|slice(0, -4)}}</a>
{% endfor %}
</div>
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
{% if categorie.positiontext != 1 %}
{% if categorie.image is defined and categorie.image is not empty %}
<div class="col-lg-12 py-5 d-flex justify-content-center">
<div class="col-sm-12 col-md-6">
<img class="img-fluid" src="{{asset_image(categorie.image)}}" alt="{{categorie.titrecategorie}}" />
</div>
</div>
{% endif %}
{% 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 categorie.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 = categorie.urlvideo|split('?v=')[1] is defined ? categorie.urlvideo|split('?v=')[1] : null %}
<a class="video-thumbnail m-0" href="{{categorie.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 %}
{% 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,
}, 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,
}, with_context = false)}}
{% endif %}
{% endfor %}
{% endif %}
</div>
{% endblock %}
{% block javascripts %}
{{parent()}}
{% if modele_galerie[0].type == 4 %}
<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 %}