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