templates/organisme/_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.     {# ----- organismes_cos ------------------------------------------------------- #}
  11.     {% if app.request.attributes.get('_route') == "organismes_cos" %}
  12.     <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  13.         <span itemprop="name">Orientation Scolaire</span>
  14.         <meta itemprop="position" content="{{ position }}">
  15.         {% set position = position + 1 %}
  16.     </li>
  17.     {% endif %}
  18.     {# ----- organismes ------------------------------------------------------- #}
  19.     {% if app.request.attributes.get('_route') == "organisme" %}
  20.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  21.             <span itemprop="name">Organismes</span>
  22.             <meta itemprop="position" content="{{ position }}">
  23.             {% set position = position + 1 %}
  24.         </li>
  25.     {% endif %}
  26.     {# ----- tous ------------------------------------------------------- #}
  27.     {% if app.request.attributes.get('_route') == "organismes_tous" %}
  28.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  29.             <a href="/organisme" itemscope itemtype="https://schema.org/Thing" itemprop="item" itemid="/organisme"><span itemprop="name">Organismes</span></a>
  30.             <meta itemprop="position" content="{{ position }}">
  31.             {% set position = position + 1 %}
  32.         </li>
  33.         <li class="separator"></li>
  34.         {% if categorie %}
  35.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  36.                 <span itemprop="name">{{ categorie.libelle }}</span>
  37.                 <meta itemprop="position" content="{{ position }}">
  38.                 {% set position = position + 1 %}
  39.             </li>
  40.         {% endif %}
  41.     {% endif %}
  42.     {# ----- departement ------------------------------------------------------- #}
  43.     {% if app.request.attributes.get('_route') == "organismes_departement" %}
  44.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  45.             <a href="/organisme" itemscope itemtype="https://schema.org/Thing" itemprop="item" itemid="/organisme"><span itemprop="name">Organismes</span></a>
  46.             <meta itemprop="position" content="{{ position }}">
  47.             {% set position = position + 1 %}
  48.         </li>
  49.         <li class="separator"></li>
  50.         {% if departement and 'BE' != departement.id %}
  51.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  52.                 <span itemprop="name">{{ departement.libelle }}</span>
  53.                 <meta itemprop="position" content="{{ position }}">
  54.                 {% set position = position + 1 %}
  55.             </li>
  56.             <li class="separator"></li>
  57.         {% endif %}
  58.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  59.             <span itemprop="name">{{ categorie.libelle }}</span>
  60.             <meta itemprop="position" content="{{ position }}">
  61.             {% set position = position + 1 %}
  62.         </li>
  63.     {% endif %}
  64.     {# ----- Region ------------------------------------------------------- #}
  65.     {% if app.request.attributes.get('_route') == "organismes_region" %}
  66.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  67.             <a href="/organisme" itemscope itemtype="https://schema.org/Thing" itemprop="item" itemid="/organisme"><span itemprop="name">Organismes</span></a>
  68.             <meta itemprop="position" content="{{ position }}">
  69.             {% set position = position + 1 %}
  70.         </li>
  71.         <li class="separator"></li>
  72.         {% if region and region | lieuLibelle != 'DEFAULT' %}
  73.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  74.                 <span itemprop="name">{{ region.libelle }}</span>
  75.                 <meta itemprop="position" content="{{ position }}">
  76.                 {% set position = position + 1 %}
  77.             </li>
  78.             <li class="separator"></li>
  79.         {% endif %}
  80.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  81.             <span itemprop="name">{{ categorie.libelle }}</span>
  82.             <meta itemprop="position" content="{{ position }}">
  83.             {% set position = position + 1 %}
  84.         </li>
  85.     {% endif %}
  86. </ul>