vendor/store.shopware.com/dreiscseopro/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_list_item %}
  3.     {% set homeShowInBreadcrumbMode = dreiscSeoCustomSettings.richSnippets.breadcrumb.home.showInBreadcrumbMode %}
  4.     {% set homeShowInBreadcrumb = 'onlyShop' == homeShowInBreadcrumbMode or 'shopAndJsonLd' == homeShowInBreadcrumbMode %}
  5.     {% set productShowInBreadcrumbMode = dreiscSeoCustomSettings.richSnippets.breadcrumb.product.showInBreadcrumbMode %}
  6.     {% set productShowInBreadcrumb = product and (
  7.         'onlyShop' == productShowInBreadcrumbMode or 'shopAndJsonLd' == productShowInBreadcrumbMode)
  8.     %}
  9.     {# Make sure, that we are before the first item #}
  10.     {# EXPLAIN: key = current id of the breadcrumb array; breadcrumb|keys|first = id of the first breadcrumb item #}
  11.     {% block dreisc_seo__layout_breadcrumb_list_item__add_home_breadcrumb %}
  12.         {% if homeShowInBreadcrumb and breadcrumb|keys|first == key %}
  13.             {% sw_include '@Storefront/storefront/dreisc-seo/component/breadcrumb/home.html.twig' with { } only %}
  14.         {% endif %}
  15.     {% endblock %}
  16.     {% if productShowInBreadcrumb %}
  17.         {% block dreisc_seo__layout_breadcrumb_list_item__modify_default %}
  18.             {# We make sure that we do not set the is-active class because the product name is issued as a bread crumb. #}
  19.             {% sw_include '@Storefront/storefront/dreisc-seo/component/breadcrumb/default.html.twig' with {
  20.                 ignoreActive: true
  21.             } %}
  22.         {% endblock %}
  23.     {% else %}
  24.         {# Otherwise: Call the parent as fallback #}
  25.         {% sw_include '@Storefront/storefront/dreisc-seo/component/breadcrumb/default.html.twig' with {
  26.             ignoreActive: false
  27.         } %}
  28.     {% endif %}
  29.     {# Check, if we reached the last breadcrumb item #}
  30.     {# EXPLAIN: key = current id of the breadcrumb array; breadcrumbCategories|last = last id of the breadcrumb array #}
  31.     {% block dreisc_seo__layout_breadcrumb_list_item__add_product_breadcrumb %}
  32.         {% if productShowInBreadcrumb and breadcrumbCategories|last.id == key %}
  33.             {% sw_include '@Storefront/storefront/dreisc-seo/component/breadcrumb/product.html.twig' with {
  34.                 product: product
  35.             } only %}
  36.         {% endif %}
  37.     {% endblock %}
  38. {% endblock %}