templates/front/actualite/detail.html.twig line 1

  1. {% extends 'front_layout.html.twig' %}
  2. {% if actualite.seoParent is not null %}
  3.     {% if actualite.seoParent.seo.metaTitre is not empty %}
  4.         {% set titre = actualite.seoParent.seo.metaTitre %}
  5.     {% else %}
  6.         {% set titre = actualite.titre %}
  7.     {% endif %}
  8. {% else %}
  9.        {% set titre = actualite.titre %}
  10. {% endif %}
  11. {% block title %}
  12.     {{ titre }}
  13. {% endblock %}
  14. {% block seo %}
  15.   {{ render(path('app_global_seo_actualite', {'id': actualite.id })) }}
  16. {% endblock %}
  17. {% block body %}
  18. <main class="t-page">
  19.     <header class="t-page__header" style="background-image: url('{{ asset('/uploads/medias/' ~ actualite.banniere.filepath)|imagine_filter('banner') }}');">
  20.         <h1 class="t-page__mainTitle">{{ actualite.titre }}</h1>
  21.     </header>
  22.     
  23.     <div class="t-page__wrap">
  24.         
  25.         {{ render(controller('App\\Controller\\WidgetController::breadcrumb', {'request': app.request})) }}
  26.         {# <p>{{ actualite.pole.name }} / {{ actualite.categorie.titre }}</p> #}
  27.         <div class="t-page__intro">
  28.             {{ actualite.description | raw }}
  29.         </div>
  30.         {% for b in blocActu %}
  31.             {%  if b.blocDiaporama is not null %}
  32.                 {% include 'front/blocs/_diaporama.html.twig' with { 'bloc' : b.blocDiaporama } %}
  33.         
  34.             {% elseif b.BlocAccordeon is not null %}
  35.                 {% include 'front/blocs/_accordeon.html.twig' with { 'bloc' : b.BlocAccordeon } %}
  36.             {% elseif b.blocColonne is not null %}
  37.                 {% include 'front/blocs/_colonne.html.twig' with { 'bloc' : b.blocColonne } %}
  38.             {% elseif b.BlocTextImage is not null  %}
  39.                 {% include 'front/blocs/_text_image.html.twig' with { 'bloc' : b.BlocTextImage } %}
  40.             
  41.             {% elseif b.blocVideo is not null %}
  42.                 {% include 'front/blocs/_video.html.twig' with { 'bloc' : b.blocVideo } %}
  43.             {% endif %}
  44.         {% endfor %}
  45.     </div>
  46.   
  47.     <section class="homeActus">
  48.         <div class="homeActus__wrap">
  49.             <div class="homeActus__row">
  50.                 <h2 class="homeActus__title">Les actus</h2>
  51.                 <a class="homeActus__all" href="{{ path('app_actualite_list') }}">&gt; Toutes les actus</a>
  52.             </div>
  53.      
  54.            <div class="homeActus__slick">
  55.               {% for actualite in actualites %}
  56.                 <div class="homeActus__slide">
  57.                   <a href="{{ path('app_actualite_detail', {'actualite': actualite.id}) }}">
  58.                       {% if actualite.banniere is not null %}
  59.                         <img class="homeActus__img" src="{{ asset('/uploads/medias/' ~ actualite.banniere.filepath)|imagine_filter('actualite') }}" alt="{{ actualite.titre }}">
  60.                       {% else %}
  61.                         <img class="homeActus__img" src="https://placehold.co/255/" alt="{{ actualite.titre }}">
  62.                       {% endif %}
  63.                       <div class="homeActus__txt">{{ actualite.titre }}</div>
  64.                   </a>
  65.                 </div>
  66.               {% endfor %}
  67.            </div>
  68.         </div>
  69.      </section>
  70.     
  71. </main>
  72. {% endblock %}