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

Open in your IDE?
  1. {% if bloc is defined and bloc is not empty %}
  2.     {% if bloc.type == 'template' %}
  3.         {% if bloc.template is defined %}
  4.               {{bloc.template|raw}}
  5.         {% endif %}
  6.     {% endif %}
  7.     {% if bloc.type == 'bloc-service' and bloc.data != null %}
  8.         {% if bloc.data.alias == "bloc_travaux" %}
  9.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_travaux.html.twig',{
  10.                 bloc: bloc.data,
  11.             }, with_context = false)}}
  12.         {% elseif bloc.data.alias == "bloc_raisons" %}
  13.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_raisons.html.twig',{
  14.                 bloc: bloc.data,
  15.             }, with_context = false)}}
  16.         {% elseif bloc.data.alias == "chiffres" %}
  17.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/chiffres.html.twig',{
  18.                 bloc: bloc.data,
  19.             }, with_context = false)}}
  20.         {% elseif bloc.data.alias == "avantages" %}
  21.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/chiffres.html.twig',{
  22.                 bloc: bloc.data,
  23.             }, with_context = false)}}
  24.         {% endif %}         
  25.     {% endif %}
  26.     {% if bloc.type == 'bloc-partenaire' and bloc.data != null %}
  27.           {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_partenaire.html.twig',{
  28.               bloc: bloc.data,
  29.           }, with_context = false)}}     
  30.     {% endif %}
  31.     
  32.     {% if  bloc.type == 'titre' %}
  33.       {% if bloc.title is defined %}
  34.           <div id="bloc-{{bloc.id}}" class="text-widget">
  35.               {{bloc.title|raw}}
  36.           </div>
  37.       {% endif %}
  38.     {% endif %}
  39.     {% if bloc.type == 'bloc-activite' %}
  40.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_activite.html.twig',{
  41.             bloc: bloc,
  42.         }, with_context = false)}}
  43.     {% endif %}
  44.     {% if bloc.type == 'bloc-secteur' %}
  45.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_localite.html.twig',{
  46.             bloc: bloc,
  47.         }, with_context = false)}}
  48.     {% endif %}
  49.     {% if bloc.type == 'bloc-sous-activite' %}
  50.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_sous_activite.html.twig',{
  51.             bloc: bloc,
  52.         }, with_context = false)}}
  53.     {% endif %}
  54.     {% if bloc.type == 'text' %}
  55.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_titre_text.html.twig',{
  56.             bloc: bloc,
  57.         }, with_context = false)}}
  58.     {% endif %}
  59.     {% if bloc.type == 'text2' %}
  60.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_image_text.html.twig',{
  61.             bloc: bloc,
  62.         }, with_context = false)}}
  63.     {% endif %}
  64.     {% if bloc.type == 'form' %}
  65.         {% if bloc.form.identifier == 'form-footer' %}
  66.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_footer.html.twig',{
  67.                 bloc: bloc,
  68.             }, with_context = false)}}
  69.         {% elseif bloc.form.identifier == 'form-contact' %}
  70.            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/contact_form.html.twig',{
  71.                 bloc: bloc,
  72.                 product_interesse:product_interesse
  73.             }, with_context = false)}}
  74.         {% elseif bloc.form.identifier == 'form-devis' %}
  75.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/devis_form.html.twig',{
  76.                 bloc: bloc,
  77.             }, with_context = false)}}
  78.         {% elseif bloc.form.identifier == 'form-faq' %}
  79.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_faq.html.twig',{
  80.                 bloc: bloc,
  81.             }, with_context = false)}}
  82.         {% elseif bloc.form.identifier == 'postuler' %}
  83.            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/postuler_form.html.twig',{
  84.                 bloc: bloc,
  85.                 annonce_interesse:annonce_interesse
  86.             }, with_context = false)}}
  87.         {% elseif bloc.form.identifier == 'newsletter' %}
  88.            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/newsletter_form.html.twig',{
  89.                 bloc: bloc,
  90.             }, with_context = false)}}
  91.         {% elseif bloc.form.identifier == 'form_lp' %}
  92.            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_landing.html.twig',{
  93.                 bloc: bloc,
  94.             }, with_context = false)}}
  95.         {% else %}
  96.           {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form.html.twig',{
  97.               bloc: bloc,
  98.           }, with_context = false)}}
  99.         {% endif %}
  100.     {% endif %}
  101.     {% if bloc.type == 'slider' and bloc.images is not empty %}
  102.         <div id="carouselDefaultIndicators" class="carousel slide slider-home" data-ride="carousel">
  103.           {% if bloc.images|length > 1 %}
  104.                 <ol class="carousel-indicators">
  105.                   {% for key,image in bloc.images %}
  106.                         <li data-target="#carouselDefaultIndicators" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
  107.                   {% endfor %}
  108.                 </ol>
  109.           {% endif %}
  110.         </div>
  111.     {% endif %}
  112.     {% if bloc.type == 'video' %}
  113.         <section id="bloc-{{bloc.id}}" class="all-works espace-p-top text-center panel-st conducteur-trigger text-center">
  114.           <iframe width="962" height="541" src="{{bloc.url_video}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  115.         </section>
  116.     {% endif %}
  117.     {% if bloc.type == 'image' %}
  118.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_image.html.twig',{
  119.               bloc: bloc,
  120.           }, with_context = false)}}
  121.     {% endif %}
  122.     {% if bloc.type == 'bloc-gallerie' %}
  123.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_galleries.html.twig',{
  124.               bloc: bloc,
  125.           }, with_context = false)}}
  126.     {% endif %}
  127.     {% if bloc.type == 'carousel' %}
  128.         <div class="BlocCarousel">
  129.               <div class="container-fluid">
  130.                     <div class="row justify-content-center">
  131.                       <div class="col-sm-12 col-md-6 col-lg-6">
  132.                             {% if bloc.images is defined and bloc.images is not empty %}
  133.                                   <div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
  134.                                       {# <ol class="carousel-indicators">
  135.                                           {% for  key,image in bloc.images %}
  136.                                               <li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
  137.                                           {% endfor %}
  138.                                       </ol> #}
  139.                                       <div class="carousel-inner text-center">
  140.                                           {% for  key,file in bloc.images  %}
  141.                                           <div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
  142.                                               {# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
  143.                                                   <img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
  144.                                               </a> #}
  145.                                               <img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel img-fluid" alt="{{file.image}}">
  146.                                           </div>
  147.                                           {% endfor %}
  148.                                       </div>
  149.                                   </div>
  150.                             {% endif %}
  151.                       </div>
  152.                     </div>
  153.               </div>
  154.         </div>
  155.     {% endif %}
  156.     {% if bloc.type == 'carousel2' %}
  157.         <div class="BlocCarousel">
  158.               <div class="container-fluid">
  159.                     <div class="row">
  160.                       {% set carousel2_g1 = bloc.gridcarousel != null? (12 - bloc.gridcarousel):'6' %}
  161.                       {% set carousel2_g2 = bloc.gridcarousel != null? bloc.gridcarousel:'6' %}
  162.                       <div class="col-sm-12 col-md-{{carousel2_g1}} col-lg-{{carousel2_g1}} {{bloc.position == 'left'?'order-2':'order-1'}}">
  163.                             {{bloc.content|raw}}
  164.                       </div>
  165.                       <div class="col-sm-12 col-md-{{carousel2_g2}} col-lg-{{carousel2_g2}} {{bloc.position == 'left'?'order-1':'order-2'}}">
  166.                             {% if bloc.images is defined and bloc.images is not empty %}
  167.                                   <div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
  168.                                       {# <ol class="carousel-indicators">
  169.                                           {% for  key,image in bloc.images %}
  170.                                               <li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
  171.                                           {% endfor %}
  172.                                       </ol> #}
  173.                                       <div class="carousel-inner text-center">
  174.                                           {% for  key,file in bloc.images  %}
  175.                                           <div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
  176.                                               {# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
  177.                                                   <img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
  178.                                               </a> #}
  179.                                               <img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel  img-fluid" alt="{{file.image}}">
  180.                                           </div>
  181.                                           {% endfor %}
  182.                                       </div>
  183.                                   </div>
  184.                             {% endif %}
  185.                       </div>
  186.                     </div>
  187.               </div>
  188.         </div>
  189.     {% endif %}
  190. {% endif %}