custom/static-plugins/BaumarktTheme/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.     {{ parent() }}
  4.     {% if category and controllerName == 'Product' %}
  5.         <div class="mobile-breadcrumb">
  6.             {% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
  7.             {% set categoryId = category.id %}
  8.             {# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
  9.             {% set breadcrumb = sw_breadcrumb(category) %}
  10.             {# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
  11.             {% set breadcrumbKeys = breadcrumb|keys %}
  12.             {# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
  13.             {% set breadcrumbTypes = sw_breadcrumb_build_types(breadcrumbCategories) %}
  14.             {% if breadcrumbCategories|length > 0 %}
  15.                 <nav>
  16.                     <ol class="breadcrumb d-block d-md-none">
  17.                         {% for breadcrumbCategory in breadcrumbCategories %}
  18.                             {% set key = breadcrumbCategory.id %}
  19.                             {% set name = breadcrumbCategory.translated.name %}
  20.                             {% if key == breadcrumbKeys|last %}
  21.                                 <div class="breadcrumb-placeholder">
  22.                                     {% sw_icon 'arrow-medium-left' style { 'size': 'fluid', 'pack': 'solid'} %}
  23.                                 </div>
  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 class="folder" itemprop="name">{{ 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.                                     {% endif %}
  42.                                     <meta itemprop="position" content="{{ loop.index }}"/>
  43.                                 </li>
  44.                             {% endif %}
  45.                         {% endfor %}
  46.                     </ol>
  47.                 </nav>
  48.             {% endif %}
  49.         </div>
  50.     {% endif %}
  51. {% endblock %}
  52. {% block layout_breadcrumb_list_item %}
  53.     {% if breadcrumbCategories|length > 2 and key == breadcrumbKeys|first %}
  54.         <li class="previous-categories breadcrumb-item">... </li>
  55.         <div class="breadcrumb-placeholder">
  56.             {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  57.         </div>
  58.     {% endif %}
  59.     <li class="breadcrumb-item"
  60.         {% if key is same as(categoryId) %}aria-current="page"{% endif %}
  61.         itemprop="itemListElement"
  62.         itemscope
  63.         itemtype="https://schema.org/ListItem">
  64.         {% if breadcrumbCategory.type == 'folder' %}
  65.             <div itemprop="item">
  66.                 <div class="folder" itemprop="name">{{ name }}</div>
  67.             </div>
  68.         {% else %}
  69.             <a href="{{ category_url(breadcrumbCategory) }}"
  70.                class="breadcrumb-link {% if key is same as(categoryId) %} is-active{% endif %}"
  71.                title="{{ name }}"
  72.                {% if category_linknewtab(breadcrumbCategory) %}target="_blank"{% endif %}
  73.                itemprop="item">
  74.                 <link itemprop="url"
  75.                       href="{{ category_url(breadcrumbCategory) }}"/>
  76.                 <span class="breadcrumb-title" itemprop="name">{{ name }}</span>
  77.             </a>
  78.         {% endif %}
  79.         <meta itemprop="position" content="{{ loop.index }}"/>
  80.     </li>
  81. {% endblock %}