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

Open in your IDE?
  1. {% if bloc is defined and bloc is not empty %}
    
        {% if bloc.type == 'template' %}
            {% if bloc.template is defined %}
                  {{bloc.template|raw}}
            {% endif %}
        {% endif %}
    
        {% if bloc.type == 'bloc-service' and bloc.data != null %}
            {% if bloc.data.alias == "bloc_travaux" %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_travaux.html.twig',{
                    bloc: bloc.data,
                }, with_context = false)}}
            {% elseif bloc.data.alias == "bloc_raisons" %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_raisons.html.twig',{
                    bloc: bloc.data,
                }, with_context = false)}}
            {% elseif bloc.data.alias == "chiffres" %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/chiffres.html.twig',{
                    bloc: bloc.data,
                }, with_context = false)}}
            {% elseif bloc.data.alias == "avantages" %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/chiffres.html.twig',{
                    bloc: bloc.data,
                }, with_context = false)}}
            {% endif %}         
        {% endif %}
    
        {% if bloc.type == 'bloc-partenaire' and bloc.data != null %}
              {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_partenaire.html.twig',{
                  bloc: bloc.data,
              }, with_context = false)}}     
        {% endif %}
    
        {% if bloc.type == 'bloc-maps' and bloc.data != null %}
              {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_maps.html.twig',{
                  bloc: bloc.data,
              }, with_context = false)}}     
        {% endif %}
    
        
        {% if  bloc.type == 'titre' %}
          {% if bloc.title is defined %}
              <div id="bloc-{{bloc.id}}" class="text-widget">
                  {{bloc.title|raw}}
              </div>
          {% endif %}
        {% endif %}
    
        {% if bloc.type == 'bloc-activite' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_activite.html.twig',{
                bloc: bloc,
            }, with_context = false)}}
        {% endif %}
    
        {% if bloc.type == 'bloc-secteur' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_localite.html.twig',{
                bloc: bloc,
            }, with_context = false)}}
        {% endif %}
    
        {% if bloc.type == 'bloc-sous-activite' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_sous_activite.html.twig',{
                bloc: bloc,
            }, with_context = false)}}
        {% endif %}
    
        {% if bloc.type == 'text' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_titre_text.html.twig',{
                bloc: bloc,
            }, with_context = false)}}
        {% endif %}
    
        {% if bloc.type == 'text2' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_image_text.html.twig',{
                bloc: bloc,
            }, with_context = false)}}
        {% endif %}
    
        {% if bloc.type == 'form' %}
            {% if bloc.form.identifier == 'form-footer' %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_footer.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'form-contact' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/contact_form.html.twig',{
                    bloc: bloc,
                    product_interesse:product_interesse
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'form-devis' %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/devis_form.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'form-faq' %}
                {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_faq.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'postuler' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/postuler_form.html.twig',{
                    bloc: bloc,
                    annonce_interesse:annonce_interesse
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'newsletter' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/newsletter_form.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'form_lp' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_landing.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'form-contact-lp' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/contact_lp_form.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.identifier == 'form-avis-clients' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/avis_clients_form.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% elseif bloc.form.type == '1' %}
               {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_contact_leads.html.twig',{
                    bloc: bloc,
                }, with_context = false)}}
            {% else %}
              {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form.html.twig',{
                  bloc: bloc,
              }, with_context = false)}}
            {% endif %}
        {% endif %}
    
    
        {% if bloc.type == 'slider' and bloc.images is not empty %}
            <div id="carouselDefaultIndicators" class="carousel slide slider-home" data-ride="carousel">
              {% if bloc.images|length > 1 %}
                    <ol class="carousel-indicators">
                      {% for key,image in bloc.images %}
                            <li data-target="#carouselDefaultIndicators" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
                      {% endfor %}
                    </ol>
              {% endif %}
            </div>
        {% endif %}
    
    
        {% if bloc.type == 'video' %}
            <section id="bloc-{{bloc.id}}" class="all-works espace-p-top text-center panel-st conducteur-trigger text-center">
              <iframe width="962" height="541" src="{{bloc.url_video}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
            </section>
        {% endif %}
    
        {% if bloc.type == 'image' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_image.html.twig',{
                  bloc: bloc,
              }, with_context = false)}}
        {% endif %}
    
        {% if bloc.type == 'bloc-gallerie' %}
            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_galleries.html.twig',{
                  bloc: bloc,
              }, with_context = false)}}
        {% endif %}
    
    
        {% if bloc.type == 'carousel' %}
            <div class="BlocCarousel">
                  <div class="container-fluid">
                        <div class="row justify-content-center">
                          <div class="col-sm-12 col-md-6 col-lg-6">
                                {% if bloc.images is defined and bloc.images is not empty %}
                                      <div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
                                          {# <ol class="carousel-indicators">
                                              {% for  key,image in bloc.images %}
                                                  <li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
                                              {% endfor %}
                                          </ol> #}
                                          <div class="carousel-inner text-center">
                                              {% for  key,file in bloc.images  %}
                                              <div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
                                                  {# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
                                                      <img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
                                                  </a> #}
                                                  <img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel img-fluid" alt="{{file.image}}">
                                              </div>
                                              {% endfor %}
                                          </div>
                                      </div>
                                {% endif %}
                          </div>
                        </div>
                  </div>
            </div>
        {% endif %}
    
        {% if bloc.type == 'carousel2' %}
            <div class="BlocCarousel">
                  <div class="container-fluid">
                        <div class="row">
                          {% set carousel2_g1 = bloc.gridcarousel != null? (12 - bloc.gridcarousel):'6' %}
                          {% set carousel2_g2 = bloc.gridcarousel != null? bloc.gridcarousel:'6' %}
                          <div class="col-sm-12 col-md-{{carousel2_g1}} col-lg-{{carousel2_g1}} {{bloc.position == 'left'?'order-2':'order-1'}}">
                                {{bloc.content|raw}}
                          </div>
                          <div class="col-sm-12 col-md-{{carousel2_g2}} col-lg-{{carousel2_g2}} {{bloc.position == 'left'?'order-1':'order-2'}}">
                                {% if bloc.images is defined and bloc.images is not empty %}
                                      <div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
                                          {# <ol class="carousel-indicators">
                                              {% for  key,image in bloc.images %}
                                                  <li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
                                              {% endfor %}
                                          </ol> #}
                                          <div class="carousel-inner text-center">
                                              {% for  key,file in bloc.images  %}
                                              <div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
                                                  {# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
                                                      <img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
                                                  </a> #}
                                                  <img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel  img-fluid" alt="{{file.image}}">
                                              </div>
                                              {% endfor %}
                                          </div>
                                      </div>
                                {% endif %}
                          </div>
                        </div>
                  </div>
            </div>
        {% endif %}
    
    {% endif %}