templates/diaporama/_includes/breadcrumb.html.twig line 1

Open in your IDE?
  1. {% set position = 1 %}
  2. <ul class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
  3.     {# ----- Rubrique ------------------------------------------------------- #}
  4.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  5.             <a href="{{ path('homepage') }}" itemscope itemtype="https://schema.org/Thing" itemprop="item" itemid=""><span itemprop="name">Accueil</span></a>
  6.             <meta itemprop="position" content="{{ position }}">
  7.             {% set position = position + 1 %}
  8.         </li>
  9.         <li class="separator"></li>
  10.     {# ----- Diaporamas ------------------------------------------------------- #}
  11.     <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  12.         <a href="{{ path('diaporama-liste') }}" itemscope itemtype="https://schema.org/Thing" itemprop="item" itemid=""><span itemprop="name">Diaporamas</span></a>
  13.         <meta itemprop="position" content="{{ position }}">
  14.         {% set position = position + 1 %}
  15.     </li>
  16.     <li class="separator"></li>
  17.     {# ----- Lieu ----------------------------------------------------------- #}
  18.     {% set region = lieu | lieuRegion %}
  19.     {% set departement = lieu | lieuDepartement %}
  20.     {% set ville = lieu | lieuVille %}
  21.     {% if app.request.attributes.get('_route') == "diaporama-liste"%}
  22.         {% if region and region | lieuLibelle != 'DEFAULT' %}
  23.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  24.                 <a href="{{ pathBuilder.buildLocalisationPath( "diaporama-liste",region) }}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{ pathBuilder.buildLocalisationPath( "diaporama-liste",region) }}">
  25.                     <span itemprop="name">{{ region | lieuLibelle }}</span>
  26.                 </a>
  27.                 <meta itemprop="position" content="{{ position }}">
  28.                 {% set position = position + 1 %}
  29.             </li>
  30.             <li class="separator"></li>
  31.         {% endif %}
  32.         {% if departement and 'BE' != departement.id %}
  33.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  34.                 <a href="{{ pathBuilder.buildLocalisationPath( "diaporama-liste",departement) }}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{ pathBuilder.buildLocalisationPath("diaporama-liste",departement) }}">
  35.                     <span itemprop="name">{{ departement | lieuLibelle }}</span>
  36.                 </a>
  37.                 <meta itemprop="position" content="{{ position }}">
  38.                 {% set position = position + 1 %}
  39.             </li>
  40.             <li class="separator"></li>
  41.         {% endif %}
  42.         {% if ville %}
  43.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  44.                 <a href="{{ pathBuilder.buildLocalisationPath( "diaporama-liste",ville) }}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{ pathBuilder.buildLocalisationPath( "diaporama-liste",ville) }}">
  45.                     <span itemprop="name">{{ ville | lieuLibelle }}</span>
  46.                 </a>
  47.                 <meta itemprop="position" content="{{ position }}">
  48.                 {% set position = position + 1 %}
  49.             </li>
  50.             <li class="separator"></li>
  51.         {% endif %}
  52.     {% else %}
  53.         {% if region and region | lieuLibelle != 'DEFAULT' %}
  54.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  55.                 <a href="{{currentURL}}/{{region.slug}}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{currentURL}}/{{region.slug}}">
  56.                     <span itemprop="name">{{ region | lieuLibelle }}</span>
  57.                 </a>
  58.                 <meta itemprop="position" content="{{ position }}">
  59.                 {% set position = position + 1 %}
  60.             </li>
  61.             <li class="separator"></li>
  62.         {% endif %}
  63.         {% if departement and 'BE' != departement.id %}
  64.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  65.                 <a href="{{currentURL}}/{{departement.slug}}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{currentURL}}/{{departement.slug}}">
  66.                     <span itemprop="name">{{ departement | lieuLibelle }}</span>
  67.                 </a>
  68.                 <meta itemprop="position" content="{{ position }}">
  69.                 {% set position = position + 1 %}
  70.             </li>
  71.             <li class="separator"></li>
  72.         {% endif %}
  73.         {% if ville %}
  74.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  75.                 <a href="{{currentURL}}/{{ville.slug}}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{currentURL}}/{{ville.slug}}">
  76.                     <span itemprop="name">{{ ville | lieuLibelle }}</span>
  77.                 </a>
  78.                 <meta itemprop="position" content="{{ position }}">
  79.                 {% set position = position + 1 %}
  80.             </li>
  81.             <li class="separator"></li>
  82.         {% endif %}
  83.     {% endif %}
  84.     <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  85.         <span itemprop="name">Liste des diaporamas</span>
  86.         <meta itemprop="position" content="{{ position }}">
  87.         {% set position = position + 1 %}
  88.     </li>
  89. </ul>