templates/front/partials/breadcrumb.html.twig line 1

Open in your IDE?
  1. <section class="breadcrumb breadcrumb--{{ theme }}">
  2.     <ol class="list-none ">
  3.         <li>
  4.             <a href="{{ page_url('home', 'front') }}">{{ 'Accueil'|trans }}</a>
  5.         </li>
  6.         {% for item in page.breadcrumb %}
  7.             <li>
  8.                 <a href="{{ item.url }}"
  9.                     class="font-weight-medium leading-none">{{ item.label }}</a>
  10.             </li>
  11.         {% endfor %}
  12.         <li class="is-active">
  13.             <span class="font-weight-medium leading-none">{{ page.title | remove_brackets | trim }}</span>
  14.         </li>
  15.     </ol>
  16.     {% set BCcounter = 1 %}
  17.     <script type="application/ld+json">
  18.         [{
  19.         "@context": "https://schema.org",
  20.         "@type": "BreadcrumbList",
  21.         "itemListElement": [{
  22.             "@type": "ListItem",
  23.             "position": {{ BCcounter }},
  24.             "name": "{{ 'Accueil'|trans }}",
  25.             "item": "{{ page_url("home", "front", { '_locale' : app.request.locale }) }}"
  26.         },
  27.         {% for item in page.breadcrumb %}
  28.         {% set BCcounter = BCcounter + 1 %}
  29.         {
  30.             "@type": "ListItem",
  31.             "position": {{ BCcounter }},
  32.             "name": "{{ item.label }}",
  33.             "item": "{{ item.url }}"
  34.         },
  35.         {% endfor %}
  36.         {
  37.             "@type": "ListItem",
  38.             "position": {{ BCcounter+ 1 }},
  39.             "item":
  40.             {
  41.                 "@id": "{{ app.request.uri }}",
  42.                 "name": "{{ page.title }}"
  43.             }
  44.         }
  45.         ]
  46.     </script>
  47. </section>