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

Open in your IDE?
  1. {% set cmptFil = 1 %}
  2. <nav aria-label="breadcrumb" class="d-flex justify-content-center" itemscope
  3.      itemtype="http://schema.org/BreadcrumbList">
  4.     <ol class="breadcrumb p-3 m-0">
  5.         <li class="breadcrumb-item" itemprop="itemListElement"
  6.             itemscope itemtype="http://schema.org/ListItem">
  7.             <a href="{{ websiteroot }}"
  8.                itemprop="item">
  9.                 {% trans %}Accueil{% endtrans %}
  10.             </a>
  11.             <meta itemprop="position" content="{{ cmptFil }}"/>
  12.             {% set cmptFil = cmptFil+1 %}
  13.         </li>
  14.         {% for fil in fileAriane %}
  15.             <li class="breadcrumb-item" itemprop="itemListElement"
  16.                 itemscope itemtype="http://schema.org/ListItem">
  17.                 <a href="{{ url('front_page',{'name': fil.permalien}) }}"
  18.                    itemprop="item">
  19.                     <span itemprop="name">{{ fil.ptitre }}</span>
  20.                 </a>
  21.                 <meta itemprop="position" content="{{ cmptFil }}"/>
  22.                 {% set cmptFil = cmptFil+1 %}
  23.             </li>
  24.         {% endfor %}
  25.         <li class="breadcrumb-item{% if catEnCours is not defined and actualite is not defined %} active{% endif %}"
  26.             {% if catEnCours is not defined and actualite is not defined %}aria-current="page"{% endif %}
  27.             itemprop="itemListElement" itemscope
  28.             itemtype="http://schema.org/ListItem">
  29.             <a itemprop="item" href="{{ path('front_news') }}">
  30.                 <span itemprop="name">{{ page.ptitreonglet|default(page.ptitre) }}</span>
  31.             </a>
  32.             <meta itemprop="position" content="{{ cmptFil }}"/>
  33.             {% set cmptFil = cmptFil+1 %}
  34.         </li>
  35.         {% if catEnCours is defined %}
  36.             {% for cat in  categories %}
  37.                 {% if cat.id == catEnCours %}
  38.                     <li class="breadcrumb-item {% if catEnCours is not defined and actualite is not defined %} active{% endif %}"
  39.                         {% if catEnCours is not defined and actualite is not defined %}aria-current="page"{% endif %}
  40.                         itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem">
  41.                         <a itemprop="item" href="{{ path('front_news', {categorie:catEnCours}) }}">
  42.                             <span itemprop="name">{{ cat.actCatIntitule }}</span>
  43.                         </a>
  44.                         <meta itemprop="position" content="{{ cmptFil }}"/>
  45.                         {% set cmptFil = cmptFil+1 %}
  46.                     </li>
  47.                 {% endif %}
  48.             {% endfor %}
  49.         {% endif %}
  50.         {% if actualite is defined %}
  51.             <li class="breadcrumb-item" aria-current="page" itemprop="itemListElement" itemscope
  52.                 itemtype="http://schema.org/ListItem">
  53.                 <a itemprop="item" href="{{ path('front_news_card', {id:actualite.id}) }}"><span
  54.                             itemprop="name">{{ actualite.actTitre }}</span></a>
  55.                 <meta itemprop="position" content="{{ cmptFil }}"/>
  56.                 {% set cmptFil = cmptFil+1 %}
  57.             </li>
  58.         {% endif %}
  59.     </ol>
  60. </nav>