custom/plugins/ChiliCustom/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" id="flex">
  20.                 {#------Home-Verzeichnis immer setzen-------#}
  21.                 {% block page_product_detail_breadcrumb %}
  22.                     {# @deprecated tag:v6.4.0 -  Will be handled by generic "layout/breadcrumb.html.twig" template #}
  23.                     {% block component_listing_breadcrumb %}
  24.                         {% set breadcrumb = category.buildSeoBreadcrumb(context.salesChannel.navigationCategoryId) %}
  25.                         <div class="breadcrumb-container">
  26.                             <a class="breadcrumb-home-link" href="{{ path('frontend.home.page') }}" title="Home">HOME</a>
  27.                             <div class="breadcrumb-placeholder">&#47;</div>
  28.                         </div>
  29.                         {% for key, item in breadcrumb %}
  30.                             <div class="breadcrumb-container">
  31.                                 {% block component_listing_breadcrumb_category %}
  32.                                     <a class="{% if key is same as(category.id) %} is-active{% endif %}"
  33.                                        href="{{ seoUrl('frontend.navigation.page', { navigationId: key }) }}">
  34.                                         {% block component_listing_breadcrumb_link_name %}
  35.                                             {{ item |upper}}
  36.                                         {% endblock %}
  37.                                     </a>
  38.                                 {% endblock %}
  39.                                 {% block component_listing_breadcrumb_placeholder %}
  40.                                     {% if item != breadcrumb|last %}
  41.                                         <div class="breadcrumb-placeholder">
  42.                                             <p> / </p>
  43.                                         </div>
  44.                                     {% endif %}
  45.                                 {% endblock %}
  46.                             </div>
  47.                         {% endfor %}
  48.                     {% endblock %}
  49.                 {% endblock %}
  50.                 {#-------------------------------#}
  51.                 {% block layout_breadcrumb_list %}
  52.                     <ol class="breadcrumb"
  53.                         itemscope
  54.                         itemtype="https://schema.org/BreadcrumbList">
  55.                         {% for breadcrumbCategory in breadcrumbCategories %}
  56.                             {% set key = breadcrumbCategory.id %}
  57.                             {% set name = breadcrumbCategory.translated.name %}
  58.                             {% block layout_breadcrumb_list_item %}
  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 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 %}
  82.                             {% block layout_breadcrumb_placeholder %}
  83.                                 {% if key != breadcrumbKeys|last %}
  84.                                     <div class="breadcrumb-placeholder">
  85.                                         {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  86.                                     </div>
  87.                                 {% endif %}
  88.                             {% endblock %}
  89.                         {% endfor %}
  90.                     </ol>
  91.                 {% endblock %}
  92.             </nav>
  93.         {% endif %}
  94.     {% endif %}
  95. {% endblock %}