{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_breadcrumb %}
{% if config('LoyxxRichBreadcrumb.config.modifyProductDetailBreadcrumb') and false %}
{{ loyxx_save_breadcrumb_category(page, app.request, context) }}
{% if page.product %}
{{ loyxx_get_breadcrumb_category(page, app.request, context) }}
{% endif %}
{% endif %}
{% set sessionSeoCategory = app.request.session.get(constant('\\LoyxxRichBreadcrumb\\Subscriber\\ProductPageLoadedEvent::SESSION_SEO_CATEGORY')) %}
{# @var \Shopware\Core\Content\Category\CategoryEntity #}
{% set seoCategory = sessionSeoCategory ? sessionSeoCategory : page.product.seoCategory %}
{% if seoCategory != null and not seoCategory.active and activeRoute in ['frontend.detail.page',' frontend.navigation.page'] %}
{% set seoCategory = page.product.categoryTree | get_active_category(context) %}
{% endif %}
{% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' with {
context: context,
category: seoCategory,
page: page
} only %}
{% endblock %}