templates/front/theme1/page_cms.html.twig line 1

Open in your IDE?
  1. {% 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 %}
        {% if modele_galerie[0].type == 10 %}
            <link rel="stylesheet" type="text/css" href="{{asset('templates/front/theme1/assets/plugins/pana-accordion-master/accordion.css')}}" media="screen" >
        {% endif %}
    
    
        {% if custom_style is defined and custom_style is not empty %}
            <style>
                {{custom_style|raw}}
            </style>
        {% endif %}
    {% endblock %}
    
    {% block body %}
      
        {% set titre_page = post.title %}
    
        {% if post.imageBandeau %}
            {% set imagebandeau =  asset_image(post.imageBandeau,'medium',['files1920','files1920','files1200']) %}
        {% elseif parametre.imageBandeau %}
            {% set imagebandeau =  asset('uploads/images/' ~ parametre.imageBandeau) %}
        {% else %}
            {% set imagebandeau = '' %}
        {% endif %}
        
        {% if imagebandeau != '' %}
            <section class="image-bandeau text-center">
                <img class="lazyload" alt="{{post.imagebandeaualt is not empty ? post.imagebandeaualt : post.title}}" title="{{post.imagebandeaualt is not empty ? post.imagebandeaualt : post.title}}" src="{{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 : "" %}
    
        {# Debut traitement champs biens #}
    
        {% set infos_vehicule = "" %}
        {% set prix_vehicule = "" %}
        {% set ref_vehicule = "" %}
        {% set equipements_vehicule = "" %}
        {% set garanties_vehicule = "" %}
    
        {% set lbl_equipements_vehicule = "" %}
        {% set lbl_garanties_vehicule = "" %}
    
        {% if post.datamodulebiens is defined and post.datamodulebiens is not empty %}
            {% set structure = unserializeStructureImport(post.typepost.id) %}
            {% set dataValues = unserialize(post.datamodulebiens) %}
            {% if structure is not empty and dataValues is not empty %}
    
                {% for key,item in structure %}
                    {% if key == 'prix' %}
                        {% if dataValues[key] is defined and dataValues[key] is not empty %}
                            {% set prix_vehicule = '<span class="lbl-prix">' ~ item ~ '</span><span class="prix-value d-block">' ~ dataValues[key].value|raw ~ '€</span>' %}
                        {% endif %}
                    {% endif %}
    
                    {% if key == 'reference' %}
                        {% if dataValues[key] is defined and dataValues[key] is not empty %}
                            {% set ref_vehicule = '<strong class="lbl-reference">' ~ item ~ ' : </strong><span class="reference-value">' ~ dataValues[key].value|raw ~ '</span>' %}
                        {% endif %}
                    {% endif %}
    
                    {% if key == 'garantie' %}
                        {% if dataValues[key] is defined and dataValues[key] is not empty %}
                            {% set lbl_garanties_vehicule = item %}
                            {% set garanties_vehicule = dataValues[key].value|raw %}
                        {% endif %}
                    {% endif %}
    
                    {% if key == 'reference' or key == 'marque' or key == 'modele' or key == 'mise_en_circulation' or key == 'energie' or key == 'kilometrage' or key == 'version' or key == 'couleur' %}
                        {% set value_info = "" %}
                        {% if dataValues[key] is defined and dataValues[key] is not empty %}
                            {% set value_info = dataValues[key].value|raw ~ (key == 'kilometrage'?'km':'') %}
                        {% endif %}
                        {% set infos_vehicule = infos_vehicule ~ '<span class="col_name"><strong class="col_nameT">' ~ item ~ ' : </strong><span class="col_nameD">' ~ value_info ~ '</span></span>' %}  
                    {% endif %}    
    
                    {% if key == 'equipements' %}
                        {% set lbl_equipements_vehicule = item %}
                        {% if dataValues[key] is defined and dataValues[key] is not empty %}
                            {% set equipements_vehicule = dataValues[key].value|raw %}
                        {% endif %}
                    {% endif %}
    
                {% endfor %}                                            
                                
            {% endif %}
        {% endif %}
        {# Fin traitement champs biens #}
        <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 %}
                                        {% if categorieTree|length > 1 and categorieTree[0] is defined %}
                                            {% set categorieTree = [categorieTree[0]] %}
                                        {% endif %}
                                            {% 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>
    
                                {% if not (galleries and galleries is not empty and template_model_gallerie is defined and template_model_gallerie is not empty and modele_galerie[0].type == 4) %}
                                    <h1 class="page-title">{{post.title|raw}}</h1>
                                {% endif %}
                                
                            </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">
                
                 {% if galleries and galleries is not empty and template_model_gallerie is defined and template_model_gallerie is not empty and modele_galerie[0].type == 4 %}
                <div class="row flex-lg-row-reverse">
    
                        <div class="col-lg-5 mb-4 mb-lg-0 pl-lg-4">
                            <h1 class="page-title mb-2">{{post.title|raw}}</h1>
                            <hr>
    
                            {% if prix_vehicule is not empty %}
                                <div class="prix-vehicule mb-2">
                                    {{prix_vehicule|raw}}
                                </div> 
                            {% endif %}
    
                            {% if garanties_vehicule is not empty %}
                                <div class="garantie-vehicule mb-3">
                                   <strong>{{lbl_garanties_vehicule|raw}} :  </strong>{{garanties_vehicule|raw}} mois
                                </div> 
                            {% endif %}
                            {# {% if ref_vehicule is not empty %}
                                <div class="ref-vehicule">
                                    {{ref_vehicule|raw}}
                                </div> 
                            {% endif %} #}
    
                            {% if infos_vehicule is not empty %}
                                <div class="carac-vehicule d-flex flex-wrap">
                                    {{infos_vehicule|raw}}
                                </div> 
                            {% endif %}
    
                            {% if post.typepost.systemname == "vehicules" and slug_page_contact('page-contact') != null %}
                                <div class="bouton-insterresse my-3">
                                    <a href="{{path('page',{slug:slug_page_contact('page-contact')})}}?product={{post.slug}}" class="btn btn-interesse">{{ 'label.biens_interresse'|trans({} , 'textes' ) }}</a>
                                </div>
                            {% endif %}
    
                        </div>
    
                        {% if galleries and galleries is not empty and template_model_gallerie is defined and template_model_gallerie is not empty and modele_galerie[0].type == 4 %}
                            <div class="col-lg-7">{{ include(template_from_string(template_model_gallerie)) }}</div>
                        {% endif %}
    
                </div>
                {% endif %}
    
                    <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.imagealt is not empty ? post.imagealt|raw : 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>" %}
    
                                {% if post.content is not empty and post.content != "" %}
                                    <div class="texte-content">{{ContentChangeByMotCle(post.id,post.content|replace({'[NDD]':lien_site}))|raw}}</div>
                                {% endif %}
    
                                {% if equipements_vehicule is not empty %}
                                <div class="col-md-12 caracteristiques-vehicules mt-5">
                                    <h3>{{ 'label.carac_biens'|trans({} , 'textes' ) }} : </h3>                               
                                    <ul class="nav nav-tabs" id="myTab" role="tablist">
                                        <li class="nav-item" role="presentation">
                                            <button class="nav-link active" id="equipements-tab" data-bs-toggle="tab" data-bs-target="#equipements" type="button" role="tab" aria-controls="equipements" aria-selected="true">{{lbl_equipements_vehicule}}</button>
                                        </li>
                                    </ul>
                                    <div class="tab-content" id="myTabContent">
                                        <div class="tab-pane fade show active" id="equipements" role="tabpanel" aria-labelledby="equipements-tab"><div class="col-equipements">{{equipements_vehicule|raw}}</div></div>
                                    </div>
                                </div>
    
                                {% endif %}
    
                                {# {% 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 %} #}
                                {% if 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 and  modele_galerie[0].type != 4 %}
                    {{ 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|extract_v %}
                                <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="youtube vidéo"/>
                                </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.isshowresume == 1 %}
    
                                                                {% 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 != "" %}
                                                                        {{cutTextAffichage(item_one.content,'affichage1',false)|raw}}
                                                                    {% endif %}
                                                                    </span>
                                                                {% endif %}
    
                                                            {% 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 %}
                                                                {{cutTextAffichage(item.content,'affichage1',false)|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 %}
                                                                {{cutTextAffichage(item.content,'affichage1',false)|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="col-lg-6 prev">
                            {% 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="col-lg-6 text-lg-right next">
                            {% 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 %}
            <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 %}
        {% if modele_galerie[0].type == 10 %}
            <script src="{{asset('templates/front/theme1/assets/plugins/pana-accordion-master/pana-accordion.js')}}" ></script>
            <script>    
                if ($(window).width() > 767){
                    accordion.init({
                    id: 'accordion',
                    autoPlay:false,
                    extpand:1,
                    expandWidth: $(window).width() - (($(window).width() / 4) * 2),
                    itemWidth: $(window).width() / 4,
                    });
                }
                if(window.innerWidth < 992){
                    var prk_panel_event="click";
                } else {
                    var prk_panel_event="hover";        
                }
                if(window.innerWidth >= 991){
                    /*    Height de bloc_header_bottom    */
                    var pos = 62;
                    $( "#sx-accordion .panel-counter" ).each(function() {
                    $(this).css({ top: pos });
                    pos = pos + 153;
                    });
                }
                if ( $( "#sx-accordion" ).length ) {
                    var headerH = $('header').outerHeight();
                    var heightHead = headerH+'px';
                    var heightcarousel = 'calc(100vh - '+heightHead+')';
                    $('#sx-accordion').accordionSlider({        
                    width:'100%',
                    height: heightcarousel,
                    shadow: true,
                    autoplay:false,
                    mouseDelay:100,
                    openPanelDuration:500,
                    closePanelDuration:500,
                    closePanelsOnMouseOut: true,
                    //mouseWheelTarget: 'page',
                    startPanel:-1,
                    maxOpenedPanelSize:'60%',
                    openPanelOn:prk_panel_event,
                    panelOverlap:false,
                    mouseWheel: false,
                    panelOpenComplete: function(event) {
                    },
                    panelClick: function(event) {
                    },
                    breakpoints: {
                        767: {
                        height: 508,
                        maxOpenedPanelSize:'50%',
                        orientation: 'vertical',
                        touchSwipe: false
                        }
                    }
                    });        
                }
            </script>
        {% endif %}
        
    {% endblock %}