templates/Layout/_breadcrumbs.html.twig line 1

Open in your IDE?
  1. {% if nodemenu is defined and nodemenu.breadCrumb|length > 1 %}
  2.     <section class="content">
  3.         <nav class="breadcrumb">
  4.             {% set homepagePageNode = nodemenu.getNodeByInternalName('homepage') %}
  5.             <a href="{{ path('_slug', { 'url': homepagePageNode.slug }) }}" class="breadcrumb__item breadcrumb__item--home">
  6.                 Start
  7.             </a>
  8.             <i class="fas fa-chevron-right"></i>
  9.             {% if refererString is defined and refererString %}
  10.                 {% set refererNodes = refererString | split(',') %}
  11.                 {% for refererNode in refererNodes %}
  12.                     {% set node = get_node_trans_by_node_id(refererNode, app.request.locale) %}
  13.                     <a href="{{ path('_slug', { 'url': node.url }) }}" class="breadcrumb__item">
  14.                         {{ node.title }}
  15.                     </a>
  16.                     <i class="fas fa-chevron-right"></i>
  17.                 {% endfor %}
  18.                 <span class="breadcrumb__item breadcrumb__item--current">
  19.                     {{ nodemenu.breadCrumb | last.title }}
  20.                 </span>
  21.             {% else %}
  22.                 {% for node in nodemenu.breadCrumb %}
  23.                     {% if not loop.first %}
  24.                         {% if loop.last %}
  25.                             <span class="breadcrumb__item breadcrumb__item--current">
  26.                                 {{ node.title }}
  27.                             </span>
  28.                         {% else %}
  29.                             <a href="{{ path('_slug', { 'url': node.slug }) }}" class="breadcrumb__item">
  30.                                 {{ node.title }}
  31.                             </a>
  32.                             <i class="fas fa-chevron-right"></i>
  33.                         {% endif %}
  34.                     {% endif %}
  35.                 {% endfor %}
  36.             {% endif %}
  37.         </nav>
  38.     </section>
  39. {% endif %}