custom/plugins/KayloBasicTheme/src/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.         {% if breadcrumbCategories|length > 0 %}
  12.             <nav aria-label="breadcrumb">
  13.                 {% block layout_breadcrumb_list %}
  14.                     <ol class="breadcrumb"
  15.                         itemscope
  16.                         itemtype="https://schema.org/BreadcrumbList">
  17.                         {% for breadcrumbCategory in breadcrumbCategories %}
  18.                             {% set key = breadcrumbCategory.id %}
  19.                             {% set name = breadcrumbCategory.translated.name %}
  20.                             {% block layout_breadcrumb_list_item %}
  21.                                 <li class="breadcrumb-item"
  22.                                     {% if key is same as(categoryId) %}aria-current="page"{% endif %}
  23.                                     itemprop="itemListElement"
  24.                                     itemscope
  25.                                     itemtype="https://schema.org/ListItem">
  26.                                     {% if breadcrumbCategory.type == 'folder' %}
  27.                                         <div itemprop="name">{{ name }}</div>
  28.                                     {% else %}
  29.                                         <a href="{{ category_url(breadcrumbCategory) }}"
  30.                                            class="breadcrumb-link {% if key is same as(categoryId) %} is-active{% endif %}"
  31.                                            title="{{ name }}"
  32.                                            {% if category_linknewtab(breadcrumbCategory) %}target="_blank"{% endif %}
  33.                                            itemprop="item">
  34.                                             <link itemprop="url"
  35.                                                   href="{{ category_url(breadcrumbCategory) }}"/>
  36.                                             <span class="breadcrumb-title" itemprop="name">{{ name }}</span>
  37.                                         </a>
  38.                                     {% endif %}
  39.                                     <meta itemprop="position" content="{{ loop.index }}"/>
  40.                                 </li>
  41.                             {% endblock %}
  42.                             {% block layout_breadcrumb_placeholder %}
  43.                                 {% if key != breadcrumbKeys|last %}
  44.                                     <div class="breadcrumb-placeholder">
  45.                                         {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  46.                                     </div>
  47.                                 {% endif %}
  48.                             {% endblock %}
  49.                         {% endfor %}
  50.                     </ol>
  51.                 {% endblock %}
  52.             </nav>
  53.         {% endif %}
  54.     {% endif %}
  55. {% endblock %}