custom/plugins/Poller24/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.         <nav aria-label="breadcrumb" class="breadcrumb-main">
  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>{{ 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.                                     <meta itemprop="position" content="{{ breadcrumbCategory.id }}"/>
  39.                                 {% endif %}
  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. {% endblock %}