{% if theme_config('breadcrumb-enabled') %}
{% block layout_breadcrumb_inner %}
{% if category %}
{% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
{% set categoryId = category.id %}
{# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
{% set breadcrumb = sw_breadcrumb(category) %}
{# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
{% set breadcrumbKeys = breadcrumb|keys %}
{# @deprecated tag:v6.5.0 - Use "sw_breadcrumb_full" directly. #}
{% set breadcrumbTypes = sw_breadcrumb_build_types(breadcrumbCategories) %}
{% set position = 1 %}
{% if breadcrumbCategories|length > 0 %}
<div class="breadcrumb-container">
<nav aria-label="breadcrumb">
{% block layout_breadcrumb_list %}
<ol class="breadcrumb"
itemscope
itemtype="https://schema.org/BreadcrumbList">
<li class="breadcrumb-item"
itemprop="itemListElement"
itemscope
itemtype="https://schema.org/ListItem">
<a href="{{ path('frontend.home.page') }}"
class="breadcrumb-link"
title="{{ "LnbThemeDefault.breadcrumb.home.title"|trans }}"
itemprop="item">
<link itemprop="url"
href="{{ path('frontend.home.page') }}"/>
<span class="breadcrumb-title"
itemprop="name">{{ "LnbThemeDefault.breadcrumb.home.label"|trans }}</span>
</a>
<meta itemprop="position" content="{{ position }}"/>
</li>
{% for breadcrumbCategory in breadcrumbCategories %}
{% set key = breadcrumbCategory.id %}
{% set name = breadcrumbCategory.translated.name %}
{% block layout_breadcrumb_list_item %}
{% if breadcrumbCategory.type !== 'folder' %}
{% set position = position + 1 %}
<li class="breadcrumb-item"
{% if key is same as(categoryId) %}aria-current="page"{% endif %}
itemprop="itemListElement"
itemscope
itemtype="https://schema.org/ListItem">
<a href="{{ category_url(breadcrumbCategory) }}"
class="breadcrumb-link {% if key is same as(categoryId) and product.name == undefined %} is-active{% endif %}"
title="{{ name }}"
{% if category_linknewtab(breadcrumbCategory) %}target="_blank"{% endif %}
itemprop="item">
<link itemprop="url"
href="{{ category_url(breadcrumbCategory) }}"/>
<span class="breadcrumb-title" itemprop="name">{{ name }}</span>
</a>
<meta itemprop="position" content="{{ position }}"/>
</li>
{% endif %}
{% if product.name %}
{% set position = position + 1 %}
<li class="breadcrumb-item"
{% if key is same as(categoryId) %}aria-current="page"{% endif %}
itemprop="itemListElement"
itemscope
itemtype="https://schema.org/ListItem">
<span
class="breadcrumb-link is-active "
title="{{ product.translated.name }}"
itemprop="item">
<span class="breadcrumb-title"
itemprop="name">{{ product.translated.name }}</span>
</span>
<meta itemprop="position" content="{{ position }}"/>
</li>
{% endif %}
{% endblock %}
{% block layout_breadcrumb_placeholder %}
{% endblock %}
{% endfor %}
</ol>
{% endblock %}
</nav>
</div>
{% endif %}
{% endif %}
{% endblock %}
{% endif %}