{% sw_extends '@Storefront/storefront/page/content/index.html.twig' %}
{% block cms_breadcrumb %}
{% if page.header.extensions.breadcrumb.getBreadcrumb() and not page.header.extensions.breadcrumb.invisibility and not page.header.navigation.active.translated.customFields.loyxx_rich_breadcrumb_disabled %}
<div id="richBreadcrumb" class="d-flex flex-wrap">
{% set navigationTree = page.header.navigation.tree %}
{% set category = page.header.navigation.active %}
{% block component_home_breadcrumb_url %}
{% if page.header.extensions.breadcrumb.showHomePageLink %}
<div class="breadcrumb-container">
<a class="{% if page.header.extensions.breadcrumb.uri is same as('/') %} is-active {% endif %}"
{% if not shopware.config.LoyxxRichBreadcrumb.config.disableLinkTitle %}
title="{{ page.header.extensions.breadcrumb.homeLabel ? page.header.extensions.breadcrumb.homeLabel : "loyxx.rich-breadcrumb.label.home" | trans }}"
{% endif %}
href="{{ page.header.extensions.breadcrumb.host }}">
{% if page.header.extensions.breadcrumb.homeLabel %}
{{ page.header.extensions.breadcrumb.homeLabel }}
{% else %}
{{ "loyxx.rich-breadcrumb.label.home" | trans }}
{% endif %}
</a>
{% if page.header.extensions.breadcrumb.uri is not same as('/') %}
{% sw_include '@LoyxxRichBreadcrumb/storefront/layout/breadcrumb-separator.html.twig' ignore missing %}
{% endif %}
</div>
{% endif %}
{% endblock %}
{% set breadcrumb = category.buildSeoBreadcrumb(context.salesChannel.navigationCategoryId) %}
{% for key, item in breadcrumb %}
<div class="breadcrumb-container">
{% block component_listing_breadcrumb_category %}
{% set hideLastLink = breadcrumb|last is same as (item) and shopware.config.LoyxxRichBreadcrumb.config.disableLinkForLastItem %}
<{{ hideLastLink ? 'strong' : 'a' }} class="{% if key is same as(category.id) %} is-active{% endif %}"
{% if not shopware.config.LoyxxRichBreadcrumb.config.disableLinkTitle %}
title="{{ item }}"
{% endif %}
{% if not hideLastLink %}
href="{{ seoUrl('frontend.navigation.page', { navigationId: key }) }}"
{% endif %}>
{% block component_listing_breadcrumb_link_name %}
{{ item }}
{% endblock %}
</{{ hideLastLink ? 'strong' : 'a' }}>
{% endblock %}
{% block component_listing_breadcrumb_placeholder %}
{% if item != breadcrumb|last %}
<div class="breadcrumb-placeholder">
{% sw_include '@LoyxxRichBreadcrumb/storefront/layout/breadcrumb-separator.html.twig' %}
</div>
{% endif %}
{% if item is same as(breadcrumb|last) and shopware.config.LoyxxRichBreadcrumb.config.showProductCount %}
{# @var blockCollection \Shopware\Core\Content\Cms\Aggregate\CmsSlot\CmsSlotCollection #}
{% set slotCollection = page.cmsPage.sections.blocks.slots %}
{# @var productListing \Shopware\Core\Content\Cms\Aggregate\CmsSlot\CmsSlotEntity #}
{% set productListing = null %}
{# @var slot \Shopware\Core\Content\Cms\Aggregate\CmsSlot\CmsSlotEntity #}
{% for slot in slotCollection %}
{% if slot.type is same as('product-listing') %}
{% set productListing = slot %}
{% endif %}
{% endfor %}
{% if productListing is defined and productListing.data.listing.total %}
<a href="#" class="" onclick="return false;"> ({{ productListing.data.listing.total | number_format}} {{ ("loyxx.rich-breadcrumb.label." ~ (productListing.data.listing.total > 1 ? "items" : "item" )) | trans }})</a>
{% endif %}
{% endif %}
{% endblock %}
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}