templates/front/page.html.twig line 1

  1. {% extends 'front_layout.html.twig' %}
  2. {% if page.seoParent is not null %}
  3.     {% if page.seoParent.seo.metaTitre is not empty %}
  4.         {% set titre = page.seoParent.seo.metaTitre %}
  5.     {% else %}
  6.         {% set titre = page.titre %}
  7.     {% endif %}
  8. {% else %}
  9.        {% set titre = page.titre %}
  10. {% endif %}
  11. {% block title %}
  12.     {{ titre }}
  13. {% endblock %}
  14. {% block seo %}
  15.     {{ render(path('app_global_seo_page', {'id': page.id })) }}
  16. {% endblock %}
  17. {% block body %}
  18. <main class="t-page">
  19.     <header class="t-page__header" 
  20.     {% if page.banniere.filepath is defined %}style="background-image: url('{{ asset('/uploads/medias/' ~ page.banniere.filepath)|imagine_filter('banner') }}');"{% endif %}
  21.     >
  22.         <h1 class="t-page__mainTitle">{{ page.titre }}</h1>
  23.     </header>
  24.     
  25.     <div class="t-page__wrap">
  26.         {{ render(controller('App\\Controller\\WidgetController::breadcrumb', {'request': app.request})) }}
  27.         <div class="t-page__intro">
  28.             {{ page.introduction }}
  29.         </div>
  30.     </div>
  31.     {% for b in blocs %}
  32.         {%  if b['diaporama'] is defined %}
  33.             {% include 'front/blocs/_diaporama.html.twig' with { 'bloc' : b } %}
  34.       
  35.         {% elseif b['accordeon'] is defined %}
  36.             {% include 'front/blocs/_accordeon.html.twig' with { 'bloc' : b } %}
  37.         {% elseif b['colonne'] is defined %}
  38.             {% include 'front/blocs/_colonne.html.twig' with { 'bloc' : b } %}
  39.         {% elseif b['textImage'] is defined  %}
  40.             {% include 'front/blocs/_text_image.html.twig' with { 'bloc' : b } %}
  41.         {% elseif b['blocVideo'] is defined %}
  42.             {% include 'front/blocs/_video.html.twig' with { 'bloc' : b.blocVideo } %}
  43.         {% endif %}
  44.     {% endfor %}
  45. </main>
  46. {% endblock %}