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

Open in your IDE?
  1. {% extends "front/"~ app.request.server.get('APP_THEME') ~"/base.html.twig" %}
  2. {% block preload %}
  3.     {% if post.image is defined  and post.image is not empty %}
  4.         {% if post.image %}
  5.             <link rel="preload" as="image" href="{{asset_image(post.image)}}" />
  6.         {% endif %}
  7.     {% endif %}
  8.      {% if galleries is defined and galleries is not empty %}
  9.            {% for item in galleries %}
  10.                 {% if item.path is defined %}
  11.                     <link rel="preload" as="image" href="{{asset_image_gallery(item.path)}}" />
  12.                 {% endif %}
  13.            {% endfor %}
  14.     {% endif %}
  15. {% endblock %}
  16. {% block stylesheets %}
  17.     {{parent()}}
  18.     {% if modele_galerie[0].type == 4 %}
  19.         <link rel="stylesheet" type="text/css" href="{{asset('templates/front/theme1/assets/plugins/flexslider/flexslider.css')}}" media="screen" >
  20.     {% endif %}
  21. {% endblock %}
  22. {% block body %}
  23.     <div class="page_cms page_activite pt-5">
  24.         <div class="breadcrumb-style-default">
  25.             <div class="container">
  26.                 <div class="row">
  27.                     <div class="col-lg-12">
  28.                         <div class="inner text-center">
  29.                             {% if breadcrumb is defined and breadcrumb is not empty %}
  30.                                 {{ include ('front/'~ app.request.server.get('APP_THEME') ~'/partials/breadcrumb.html.twig')}}
  31.                                 <h1 class="page-title">{{breadcrumb|last.name}}</h1>
  32.                             {% endif %}
  33.                         </div>
  34.                     </div>
  35.                 </div>
  36.             </div>
  37.         </div>
  38.         <div id="bloc-principal" class="container-fluid wrapper mt-3">
  39.             <div  class="row gx-5 py-2">
  40.                 {% if post.summary is not empty and post.summary != "" %}
  41.                     <div class="col-sm-12 text-center">
  42.                         <h2 class="sub-title wow">{{post.summary}}</h2>
  43.                     </div>
  44.                 {% endif %}
  45.                 
  46.                 {% if post.content is not empty and post.content != "" %}
  47.                     <div class="col-lg-12 content_post">
  48.                         <div class="my-4 text-page-ref">
  49.                             {% if post.image and post.image is not empty  %}
  50.                                 <div class="container-img">
  51.                                     <img class="lazyload img-fluid principal-img " data-srcset="{{asset_image(post.image)}}" src="{{asset_image(post.image)}}" alt="{{post.titre}}" />
  52.                                 </div>
  53.                             {% endif %}
  54.                             <div>
  55.                                 {% if post.content is not empty and post.content != " " %}
  56.                                     <div class=""> {{post.content|raw}}</div>
  57.                                 {% endif %}
  58.                             </div>
  59.                         </div>
  60.                       
  61.                         {% if post.typelien == null %}
  62.                             {% if categorieTree is defined and categorieTree[0] is defined  %}
  63.                                 <div class="text-center py-2">
  64.                                     <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>
  65.                                 </div>
  66.                             {% endif %}
  67.                         {% elseif post.typelien != 1 %}
  68.                                 {% if post.typelien == '4' %}
  69.                                     <div class="text-center py-2">
  70.                                         <a href="javascript:void(0)" onclick="window.location.href = 'tel:{{post.telephone}}';" class="btn btn-cms py-3 px-5 mt-3 btn-plus">{{post.titrelien}}</a>
  71.                                     </div>
  72.                                 {% elseif post.typelien == '2' %}
  73.                                     <div class="text-center py-2">
  74.                                         <a href="{{slug_link_interne(post.lieninterne)}}" class="btn btn-cms py-3 px-5 mt-3 btn-plus">{{post.titrelien}}</a>
  75.                                     </div>
  76.                                 {% elseif post.typelien == '3' %}
  77.                                     <div class="text-center py-2">
  78.                                         <a href="{{post.lienexterne}}" target="_blank" class="btn btn-cms py-3 px-5 mt-3 btn-plus">{{post.titrelien}}</a>
  79.                                     </div>
  80.                                 {% endif %}
  81.                         {% endif %}
  82.                         {% if docs and docs is not empty %}
  83.                             <div class="col-md-12 bloc-docs d-flex justify-content-center">
  84.                                 {% for doc in docs %}
  85.                                     <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>   
  86.                                 {% endfor %}
  87.                             </div>
  88.                         {% endif %}
  89.                     </div>
  90.                 {% endif %}
  91.             </div>
  92.         </div>
  93.         {% if galleries and galleries is not empty and template_model_gallerie is defined and template_model_gallerie is not empty %}
  94.             {{ include(template_from_string(template_model_gallerie)) }}
  95.         {% endif %}
  96.         {% if post.urlvideo is not empty %}
  97.             <div class="container-fluid wrapper mt-3">
  98.                 <div class="col-md-12 mt-1">
  99.                     <div class="video">
  100.                         {% set id_video_externe = post.urlvideo|split('?v=')[1] %}
  101.                         <a class="video-thumbnail m-0" href="{{post.urlvideo}}" data-fancybox="video">
  102.                             <img src="https://img.youtube.com/vi/{{id_video_externe}}/maxresdefault.jpg" class="img-fluid" alt=""/>
  103.                         </a>
  104.                     </div>
  105.                 </div>
  106.             </div>
  107.         {% endif %}
  108.         {% if blocs is defined  %}
  109.             {% for bloc in blocs.Bloc %}
  110.                 {% if is_mobile() and  bloc.mobile == true   %}
  111.                     {{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc.html.twig',{
  112.                         bloc: bloc,
  113.                     }, with_context = false)}}
  114.                 {% endif %}
  115.                 
  116.                 {% if is_full_view() and is_mobile() == false and bloc.desktop == true %}
  117.                     {{ include ('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc.html.twig',{
  118.                         bloc: bloc,
  119.                     }, with_context = false)}}
  120.                 {% endif %}
  121.             {% endfor %}
  122.         {% endif %} 
  123.         <div class="bg-pages-ref">
  124.      
  125.             {% if ref_pages is defined and ref_pages is not empty  %}
  126.                 <section id="bloc-refs" class="page-ref">
  127.                     <div class="container-fluid  mt-3">
  128.                         <div class="row gx-5 py-2">
  129.                             <div class="col-sm-12 text-center">
  130.                                 <h2 class="sub-title wow">{{parametreRef.titreblocautreprestation|default('')}} {{post.titre|lower}} </h2>
  131.                             </div>
  132.                             <div class="col-sm-12">
  133.                                 <div class="list_blocs pos1">
  134.                                     <div class="blocs">
  135.                                         <section class="results dynam-affichage affichage1 type_affiche3 ">
  136.                                             {% set duree = 0.1 %}
  137.                                             {% for item in ref_pages %}
  138.                                                 {% set image_item = item.image != null? asset_image(item.image):'uploads/images/' ~ parametre.imagevide %}
  139.                                                 <div class="article wow zoomIn animated" data-wow-delay="{{duree}}s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">
  140.                                                     <span class="article-image lazyloaded"  style="background-image: url({{image_item}}); background-size: cover; background-position: center center; background-repeat: no-repeat;"> </span>                 
  141.                                                     <span class="article-cnt">
  142.                                                         <a class="article-titre" href="{{path('page',{slug:item.slug})}}" title="">{{item.title}}</a>
  143.                                                         <span class="article-txt">
  144.                                                             {% if item.summary is not empty %}
  145.                                                                 {{item.summary|raw}}
  146.                                                             {% else %}
  147.                                                                 {{cutText(item.content)|raw}}
  148.                                                             {% endif %}
  149.                                                         </span>
  150.                                                         <span class="article-bts">
  151.                                                             <button class="article-plus btn-fade" onclick="window.open('{{path('page',{slug:item.slug})}}', '_self');" title="En savoir plus">En savoir plus</button>
  152.                                                         </span>
  153.                                                     </span>
  154.                                                 </div>
  155.                                                 {% set duree = duree + 0.2 %}
  156.                                             {% endfor %}
  157.                                         </section>
  158.                                     </div>
  159.                                 </div>
  160.                             </div>
  161.                         </div>
  162.                     </div>
  163.                 </section>
  164.             {% endif %}
  165.             {% if ref_pages_sous_activite is defined and ref_pages_sous_activite is not empty  %}
  166.                 <section id="bloc-sous-activites" class="page-ref">
  167.                     <div class="container-fluid  mt-3">
  168.                         <div class="row gx-5 py-2">
  169.                             <div class="col-sm-12 text-center">
  170.                                 <h2 class="sub-title wow">{{parametreRef.titreblocsousactivite|default('')}} {{secteur.titresecteur|default('')}}</h2>
  171.                             </div>
  172.                             <div class="col-sm-12">
  173.                                 <div class="list_blocs pos1">
  174.                                     <div class="blocs">
  175.                                         <section class="results dynam-affichage affichage1 type_affiche3 ">
  176.                                             {% for item in ref_pages_sous_activite %}
  177.                                                 {% set duree = 0.1 %}
  178.                                                 {% set image_item = item.image != null? asset_image(item.image):'uploads/images/' ~ parametre.imagevide %}
  179.                                                 <div class="article wow zoomIn animated" data-wow-delay="{{duree}}s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">
  180.                                                     <span class="article-image lazyloaded" style="background-image: url({{image_item}}); background-size: cover; background-position: center center; background-repeat: no-repeat;"> </span>                 
  181.                                                     <span class="article-cnt">
  182.                                                         <a class="article-titre" href="{{path('page',{slug:item.slug})}}" title="" >{{item.titre}}</a>
  183.                                                         <span class="article-txt">
  184.                                                             {{cutText(item.content)|raw}}
  185.                                                         </span>
  186.                                                         <span class="article-bts">
  187.                                                            <button class="article-plus btn-fade" onclick="window.open('{{path('page',{slug:item.slug})}}', '_self');" title="En savoir plus">En savoir plus</button>
  188.                                                         </span>
  189.                                                     </span>
  190.                                                 </div>
  191.                                                 {% set duree = duree + 0.2 %}
  192.                                             {% endfor %}
  193.                                         </section>
  194.                                     </div>
  195.                                 </div>
  196.                             </div>
  197.                         </div>
  198.                     </div>
  199.                 </section>
  200.             {% endif %}
  201.             
  202.             {% if actualites_liee is defined and actualites_liee is not empty %}
  203.                 <section id="bloc-actualites" class="page-ref">
  204.                     <div class="container-fluid  mt-3">
  205.                         <div class="row gx-5 py-2">
  206.                             <div class="col-sm-12 text-center">
  207.                                 <h2 class="sub-title wow">{{parametreRef.titreblocactualite|default('')}}</h2>
  208.                             </div>
  209.                             <div class="col-sm-12">
  210.                                 <div class="list_blocs pos1">
  211.                                     <div class="blocs">
  212.                                         <section class="results dynam-affichage affichage1 type_affiche3 ">
  213.                                             {% for item in actualites_liee %}
  214.                                                 {% set duree = 0.1 %}
  215.                                                 {% set image_item = item.image != null? asset_image(item.image):'uploads/images/' ~ parametre.imagevide %}
  216.                                                 <div class="article wow zoomIn animated" data-wow-delay="{{duree}}s" style="visibility: visible; animation-delay: 0.1s; animation-name: zoomIn;">
  217.                                                     <span class="article-image lazyloaded"  style="background-image: url({{image_item}}); background-size: cover; background-position: center center; background-repeat: no-repeat;"> </span>                 
  218.                                                     <span class="article-cnt">
  219.                                                         <a class="article-titre" href="{{path('page',{slug:item.slug})}}" title="" >{{item.title}}</a>
  220.                                                         <span class="article-txt">
  221.                                                             {% if item.summary is not empty %}
  222.                                                                 {{item.summary|raw}}
  223.                                                             {% else %}
  224.                                                                 {{cutText(item.content)|raw}}
  225.                                                             {% endif %}
  226.                                                         </span>
  227.                                                         <span class="article-bts">
  228.                                                             <button class="article-plus btn-fade" onclick="window.open('{{path('page',{slug:item.slug})}}', '_self');" title="En savoir plus">En savoir plus</button>
  229.                                                         </span>
  230.                                                     </span>
  231.                                                 </div>
  232.                                                 {% set duree = duree + 0.2 %}
  233.                                             {% endfor %}
  234.                                         </section>
  235.                                     </div>
  236.                                 </div>
  237.                             </div>
  238.                         </div>
  239.                     </div>
  240.                 </section>
  241.             {% endif %}
  242.         </div>
  243.         <div class="container-fluid wrapper mt-3">
  244.             {% if next_article is defined and next_article is not empty or prev_article is defined and prev_article is not empty %}
  245.                <div class="row gx-5 py-4">
  246.                     <div class="col-lg-12 d-flex justify-content-between">
  247.                         <div class="">
  248.                             {% if prev_article is defined and prev_article is not empty %}
  249.                               <a href="{{path('page',{'slug':prev_article.slug})}}" title="{{prev_article.title}}"><span class="signe1"><i class="fa fa-arrow-left"></i></span> {{prev_article.title}}</a>
  250.                             {% endif %}
  251.                         </div>
  252.                         <div class="">
  253.                             {% if next_article is defined and next_article is not empty %}
  254.                               <a href="{{path('page',{'slug':next_article.slug})}}"  title="{{next_article.title}}">{{next_article.title}}  <span class="signe1"><i class="fa fa-arrow-right"></i></span></a>
  255.                             {% endif %}
  256.                         </div>
  257.                     </div>
  258.                 </div>
  259.             {% endif %}
  260.         </div>
  261.     </div> 
  262. {% endblock %}
  263. {% block javascripts %}
  264.     {{parent()}}
  265.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
  266.     {% if modele_galerie[0].type == 4 %}
  267.         <script src="{{asset('templates/front/theme1/assets/plugins/flexslider/jquery.flexslider.js')}}" ></script>
  268.         <script>    
  269.             /*-------------------------------------------------*/
  270.             /* =  Sx flexslider 
  271.             /*-------------------------------------------------*/
  272.             if ($(".sx_flexslider").length) {
  273.             $('.flex-carousel').flexslider({
  274.             animation: "slide",
  275.             controlNav: false,
  276.             animationLoop: true,
  277.             slideshow: false,
  278.             itemWidth: 150,
  279.             asNavFor: '.flex-slider'
  280.             });
  281.             $('.flex-slider').flexslider({
  282.             animation: "slide",
  283.             controlNav: false,
  284.             animationLoop: true,
  285.             slideshow: false,
  286.             sync: ".flex-carousel"
  287.             });
  288.             }
  289.         </script>
  290.     {% endif %}
  291.     
  292. {% endblock %}