custom/plugins/WabsIgmTheme/src/Resources/views/storefront/layout/breadcrumb.html.twig line 1

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