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