vendor/shopware/platform/src/Storefront/Resources/views/storefront/layout/breadcrumb.html.twig line 1

Open in your IDE?
  1. {% block layout_breadcrumb_inner %}
  2.     {% if category %}
  3.         {% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
  4.         {% set categoryId = category.id %}
  5.         {# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
  6.         {% set breadcrumb = sw_breadcrumb(category) %}
  7.         {# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
  8.         {% set breadcrumbKeys = breadcrumb|keys %}
  9.         {# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
  10.         {% set breadcrumbTypes = sw_breadcrumb_build_types(breadcrumbCategories) %}
  11.         <nav aria-label="breadcrumb">
  12.             {% block layout_breadcrumb_list %}
  13.                 <ol class="breadcrumb"
  14.                     itemscope
  15.                     itemtype="https://schema.org/BreadcrumbList">
  16.                     {% for breadcrumbCategory in breadcrumbCategories %}
  17.                         {% set key = breadcrumbCategory.id %}
  18.                         {% set name = breadcrumbCategory.translated.name %}
  19.                         {% block layout_breadcrumb_list_item %}
  20.                             <li class="breadcrumb-item"
  21.                                 {% if key is same as(categoryId) %}aria-current="page"{% endif %}
  22.                                 itemprop="itemListElement"
  23.                                 itemscope
  24.                                 itemtype="https://schema.org/ListItem">
  25.                                 {% if breadcrumbCategory.type == 'folder' %}
  26.                                     <div>{{ name }}</div>
  27.                                 {% else %}
  28.                                     <a href="{{ category_url(breadcrumbCategory) }}"
  29.                                        class="breadcrumb-link {% if key is same as(categoryId) %} is-active{% endif %}"
  30.                                        title="{{ name }}"
  31.                                        {% if category_linknewtab(breadcrumbCategory) %}target="_blank"{% endif %}
  32.                                        itemprop="item">
  33.                                         <link itemprop="url"
  34.                                               href="{{ category_url(breadcrumbCategory) }}"/>
  35.                                         <span class="breadcrumb-title" itemprop="name">{{ name }}</span>
  36.                                     </a>
  37.                                     <meta itemprop="position" content="{{ breadcrumbCategory.id }}"/>
  38.                                 {% endif %}
  39.                             </li>
  40.                         {% endblock %}
  41.                         {% block layout_breadcrumb_placeholder %}
  42.                             {% if key != breadcrumbKeys|last %}
  43.                                 <div class="breadcrumb-placeholder">
  44.                                     {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  45.                                 </div>
  46.                             {% endif %}
  47.                         {% endblock %}
  48.                     {% endfor %}
  49.                 </ol>
  50.             {% endblock %}
  51.         </nav>
  52.     {% endif %}
  53. {% endblock %}