templates/front/front_news/header.html.twig line 1

Open in your IDE?
  1. {% if  app.request.get('_route') == "front_news_card" %}
  2.     {% set mediaTmp = actualite.actIllustrationFichier %}
  3. {% else %}
  4.     {% set mediaTmp = actuIndexMedia %}
  5. {% endif %}
  6. {#    {% if catEnCours is defined and catEnCours is not null and catEnCours > 0 and categories[catEnCours].actCatBandeau %} #}
  7. {#        {% set mediaTmp = 'actualite/'~categories[catEnCours].actCatBandeau %} #}
  8. {#    {% elseif page.pbandeau is defined and page.pbandeau is not null and page.pbandeau != "" %} #}
  9. {#        {% set mediaTmp = 'pages/'~page.pbandeau %} #}
  10. {#    {% endif %} #}
  11. {% set mediaDefault = "default.jpg" %}
  12. {% set mediaTmp = webp(webpSupported, mediaTmp)|url_encode %}
  13. {% set mediaDefault = webp(webpSupported, mediaDefault)|url_encode %}
  14. {% if  app.request.get('_route') == "front_news_card" %}
  15. <section data-bs-version="5.1" class="header1 cid-sYtfgmlx9v mbr-parallax-background" id="header1-2l"
  16.          style="background-image: url('{{ asset("/medias_front/actualite/"~mediaTmp|default(mediaDefault))|imagine_filter('front_Bandeau_1920') }}')">
  17.     {% else %}
  18.     <section data-bs-version="5.1" class="header1 cid-sYtfgmlx9v mbr-parallax-background" id="header1-2l"
  19.              style="background-image: url('{{ asset("/medias_front/pages/"~mediaTmp|default(mediaDefault))|imagine_filter('front_Bandeau_1920') }}')">
  20.         {% endif %}
  21.         <div class=" mbr-overlay" style="opacity: 0; background-color: rgb(255, 255, 255);"></div>
  22.         <div class="d-flex align-items-end justify-content-center container">
  23.             <div class="row justify-content-center">
  24.                 <div class="">
  25.                     {% if page.ptitre %}
  26.                         <h1 class="mbr-section-title mbr-fonts-style mb-0 display-1">{{ page.ptitreonglet|default(page.ptitre) }}</h1>
  27.                     {% endif %}
  28.                 </div>
  29.             </div>
  30.         </div>
  31.     </section>