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

Open in your IDE?
  1. {% extends 'layouts/layouts_front/base_front.html.twig' %}
  2. {% block stylesheets %}
  3.     <link rel="stylesheet preload" as="style" media="screen" href="{{ asset('css/actualite.css') }}">
  4.     <link rel="stylesheet preload" as="style" media="screen" href="{{ asset('css/page.css') }}">
  5. {% endblock %}
  6. {% set titleAff = "" %}
  7. {% if actualite is defined %}
  8.     {% set titleAff = actualite.actTitre~" - " %}
  9. {% endif %}
  10. {% set titleAff = titleAff~""~page.seoTitle|default(page.ptitreonglet)|default(page.ptitre) %}
  11. {% set titleAff = titleAff|slice(0,34)~" | "~nomDuSite %}
  12. {% set metaDescr = page.seoDescription %}
  13. {% if actualite is defined %}
  14.     {% set metaDescr = actualite.actTitre~" - " %}
  15. {% endif %}
  16. {% if catEnCours is defined %}
  17.     {% for cat in  categories %}
  18.         {% if cat.id == catEnCours %}
  19.             {% if app.request.locale == 'fr' %}
  20.                 {% set metaDescr = "Dans la catégorie d'actualité "~cat.actCatIntitule~" : "~actualite.actTitre~" sur le site des "~nomDuSite %}
  21.             {% else %}
  22.                 {% set metaDescr = "In the "~cat.actCatIntitule~" news  category : "~actualite.actTitre~" on the "~nomDuSite~" website" %}
  23.             {% endif %}
  24.         {% endif %}
  25.     {% endfor %}
  26. {% endif %} 
  27. {% block metaDescription %}{{ metaDescr }}{% endblock %}
  28. {% block metaDescriptionOg %}{{ metaDescr }}{% endblock %}
  29. {% block keywords %}{{ page.seoKeywords }}{% endblock %}
  30. {% block title %}{{ titleAff }}{% endblock %}
  31. {% block titleOg %}{{ titleAff }}{% endblock %}
  32. {% block content %}
  33.     {{ include('front/front_news/header.html.twig') }}
  34.     {{ include('front/front_news/nav_ariane.html.twig') }}
  35.     {% set type = bloc.bloc_type_texte_image|default(0) %}
  36.     <div class="container blockactus" itemscope itemtype="http://schema.org/BlogPosting"
  37.          itemref="author_box review_box">
  38.         <div class="row justify-content-center">
  39.             <div class="col-md-12 col-lg-11">
  40.                 <div class="d-flex justify-content-center flex-column align-items-center mb-3">
  41.                     {% if actualite.actTitre %}
  42.                         <h2 itemprop="name" class="titreActus">
  43.                             <span>{{ actualite.actTitre }}</span>
  44.                         </h2>
  45.                     {% endif %}
  46.                     <time itemprop="datePublished"
  47.                           datetime="{{ actualite.actDatePublication|date('Y-m-d') }}" class="dateActus">
  48.                         {{ actualite.actDatePublication|date("d-m-Y") }}
  49.                     </time>
  50.                 </div>
  51.             </div>
  52.         </div>
  53.     </div>
  54.     {{ actualite_content|raw }}
  55. {% endblock %}
  56. {% block javascripts %}
  57. {% endblock %}