templates/jpo/_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.     {# ----- JPOS ------------------------------------------------------- #}
  11.     <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  12.         <a href="{{ path('jpo-liste') }}" itemscope itemtype="https://schema.org/Thing" itemprop="item" itemid=""><span itemprop="name">Journées portes ouvertes</span></a>
  13.         <meta itemprop="position" content="{{ position }}">
  14.         {% set position = position + 1 %}
  15.     </li>
  16.     <li class="separator"></li>
  17.     {# ----- Lieu ----------------------------------------------------------- #}
  18.     {% if app.request.attributes.get('_route') == "jpo-etab" %}
  19.         {% set region = jpo.etablissement.region %}
  20.         {% set departement = jpo.etablissement.departement | lieuDepartement %}
  21.         {% set ville = jpo.etablissement.ville | lieuVille %}
  22.     {% else %}
  23.         {% set region = lieu | lieuRegion %}
  24.         {% set departement = lieu | lieuDepartement %}
  25.         {% set ville = lieu | lieuVille %}   
  26.     {% endif %}
  27.     {% if app.request.attributes.get('_route') == "jpo-liste"%}
  28.         {% if region and region | lieuLibelle != 'DEFAULT' %}
  29.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  30.                 <a href="{{ pathBuilder.buildLocalisationPath("jpo-liste", region) }}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{ pathBuilder.buildLocalisationPath( "jpo-liste",region) }}">
  31.                     <span itemprop="name">{{ region | lieuLibelle }}</span>
  32.                 </a>
  33.                 <meta itemprop="position" content="{{ position }}">
  34.                 {% set position = position + 1 %}
  35.             </li>
  36.             <li class="separator"></li>
  37.         {% endif %}
  38.         {% if departement and 'BE' != departement.id %}
  39.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  40.                 <a href="{{ pathBuilder.buildLocalisationPath("jpo-liste", departement) }}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{ pathBuilder.buildLocalisationPath("jpo-liste",departement) }}">
  41.                     <span itemprop="name">{{ departement | lieuLibelle }}</span>
  42.                 </a>
  43.                 <meta itemprop="position" content="{{ position }}">
  44.                 {% set position = position + 1 %}
  45.             </li>
  46.             <li class="separator"></li>
  47.         {% endif %}
  48.         {% if ville %}
  49.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  50.                 <a href="{{ pathBuilder.buildLocalisationPath( "jpo-liste",ville) }}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{ pathBuilder.buildLocalisationPath( "jpo-liste",ville) }}">
  51.                     <span itemprop="name">{{ ville | lieuLibelle }}</span>
  52.                 </a>
  53.                 <meta itemprop="position" content="{{ position }}">
  54.                 {% set position = position + 1 %}
  55.             </li>
  56.             <li class="separator"></li>
  57.         {% endif %}
  58.     {% else %}
  59.         {% if region and region | lieuLibelle != 'DEFAULT' %}
  60.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  61.                 <a href="{{currentURL}}/{{region.slug}}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{currentURL}}/{{region.slug}}">
  62.                     <span itemprop="name">{{ region | lieuLibelle }}</span>
  63.                 </a>
  64.                 <meta itemprop="position" content="{{ position }}">
  65.                 {% set position = position + 1 %}
  66.             </li>
  67.             <li class="separator"></li>
  68.         {% endif %}
  69.         {% if departement and 'BE' != departement.id %}
  70.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  71.                 <a href="{{currentURL}}/{{departement.slug}}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{currentURL}}/{{departement.slug}}">
  72.                     <span itemprop="name">{{ departement | lieuLibelle }}</span>
  73.                 </a>
  74.                 <meta itemprop="position" content="{{ position }}">
  75.                 {% set position = position + 1 %}
  76.             </li>
  77.             <li class="separator"></li>
  78.         {% endif %}
  79.         {% if ville %}
  80.             <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  81.                 <a href="{{currentURL}}/{{ville.slug}}" itemscope itemtype="https://schema.org/Place" itemprop="item" itemid="{{currentURL}}/{{ville.slug}}">
  82.                     <span itemprop="name">{{ ville | lieuLibelle }}</span>
  83.                 </a>
  84.                 <meta itemprop="position" content="{{ position }}">
  85.                 {% set position = position + 1 %}
  86.             </li>
  87.             <li class="separator"></li>
  88.         {% endif %}
  89.     {% endif %}
  90.     <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  91.         {% if jpo.etablissement.denomination is defined %}
  92.         <span itemprop="name">{{ jpo.etablissement.denomination }}</span>
  93.         {% else %}
  94.         <span itemprop="name">Liste des journées portes ouvertes</span>
  95.         {% endif %}
  96.         <meta itemprop="position" content="{{ position }}">
  97.         {% set position = position + 1 %}
  98.     </li>
  99. </ul>