{block name='layout-breadcrumb'}
    {strip}
    {$fromWidget=$fromWidget|default:false}
    {$idSuffix=$idSuffix|default:''}
    {$withStructuredData = true}
    {if !empty($structuredDataType) && $structuredDataType === 'none'}
        {$withStructuredData = false}
    {/if}
    {if !empty($Brotnavi) && !$bExclusive && !$bAjaxRequest && ($fromWidget || ($nSeitenTyp !== $smarty.const.PAGE_STARTSEITE && $nSeitenTyp !== $smarty.const.PAGE_WARENKORB && $nSeitenTyp !== $smarty.const.PAGE_BESTELLVORGANG && $nSeitenTyp !== $smarty.const.PAGE_BESTELLSTATUS && $nSeitenTyp !== $smarty.const.PAGE_BESTELLABSCHLUSS))}
        <div class="row no-gutters breadcrumb-wrapper">
            <div class="col col-auto">
                <nav aria-label="{et_language key='et360_aria_breadcrumb'}" id="breadcrumb{if !empty($idSuffix)}-{$idSuffix}{/if}"{if $withStructuredData} itemprop="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList"{/if}>
                    <ol class="breadcrumb">
                        {$isFilterUrl = (isset($NaviFilter) && count($NaviFilter->getActiveFilters()) > 0)}
                        {$isVarCombiProductPage = ($nSeitenTyp === $smarty.const.PAGE_ARTIKEL && isset($Artikel) && ($Artikel->kVaterArtikel > 0 || $Artikel->nIstVater === 1))}
                        {$canonicalUrl = $cCanonicalURL|default:''}
                        {$homepageUrl = rtrim($ShopURL, '/')}
                        {if isset($ShopHomeURL)}
                            {$homepageUrl = rtrim($ShopHomeURL, '/')}
                        {/if}
                        {$homepageUrl="{$homepageUrl}/"}
                        {block name='layout-breadcrumb-sm-back'}
                            {$parent = $Brotnavi[max(count($Brotnavi) - 2, 0)]}
                            {if $parent !== null}
                                <li class="breadcrumb-item breadcrumb-arrow">
                                    <a class="breadcrumb-link"
                                        href="{$parent->getURLFull()}"
                                        {if $parent->getURLFull() === $homepageUrl}aria-label="{sanitizeTitle title=$parent->getName()}"{/if}
                                        target="_self"
                                    >
                                        {if $withStructuredData}<meta itemprop="name" content="{$parent->getName()|strip_tags|escape:'html'}" />{/if}
                                        <span>{if $parent->getURLFull() === $homepageUrl}<i class="{et_getIcon key="home"}"></i>{else}{$parent->getName()}{/if}</span>
                                    </a>
                                </li>
                            {/if}
                        {/block}
                        {block name='layout-breadcrumb-items'}
                            {foreach $Brotnavi as $oItem}
                                {* We don't want to link breadcrumb items if their URL is the same as the canonical URL OR if we are on a filter (for usability reasons - to allow the canonical link to be used to reset filtering), also not if we are on varcombi product page, to enable resetting selected variations *}
                                {$linkItem = ($isFilterUrl || $isVarCombiProductPage || ($oItem->getURLFull() !== $canonicalUrl || $nSeitenTyp === $smarty.const.PAGE_MEINKONTO))}
                                {if $oItem@first}{* First Item in the breadcrumb list, but may also be the last item *}
                                    {block name='layout-breadcrumb-first-item'}
                                        <li class="breadcrumb-item first"{if $withStructuredData} itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"{/if}>
                                            <a class="breadcrumb-link link-discreet"
                                                {if $linkItem}
                                                    href="{$oItem->getURLFull()}"
                                                    target="_self"
                                                    {if $withStructuredData}itemprop="url"{/if}
                                                {else}
                                                    aria-current="page"
                                                {/if}
                                               {if $oItem->getURLFull() === $homepageUrl}aria-label="{sanitizeTitle title=$oItem->getName()}"{/if}
                                            >
                                                <span>{if $oItem->getURLFull() === $homepageUrl}<i class="{et_getIcon key="home"}"></i>{else}{$oItem->getName()|escape:'html'}{/if}</span>
                                                {if $withStructuredData}
                                                    <meta itemprop="name" content="{$oItem->getName()|strip_tags|escape:'html'}" />
                                                    <meta itemprop="item" content="{$oItem->getURLFull()}" />
                                                    <meta itemprop="position" content="{$oItem@iteration}" />
                                                    {if !$linkItem}<meta itemprop="url" content="{$oItem->getURLFull()}" />{/if}
                                                {/if}
                                            </a>
                                            {if !$oItem@last}<i class="breadcrumb-divider {et_getIcon key="breadcrumbDivider"}" aria-hidden="true"></i>{/if}
                                        </li>
                                    {/block}
                                {elseif $oItem@last}{* Last Item in the breadcrumb list, definitely not the first *}
                                    {block name='layout-breadcrumb-last-item'}
                                        <li class="breadcrumb-item last active"{if $withStructuredData} itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"{/if}>
                                            <a class="breadcrumb-link link-discreet"
                                               {if $linkItem}
                                                   href="{$oItem->getURLFull()}"
                                                   target="_self"
                                                    {if $withStructuredData}itemprop="url"{/if}
                                               {else}
                                                   aria-current="page"
                                               {/if}
                                               {if $oItem->getURLFull() === $homepageUrl}aria-label="{sanitizeTitle title=$oItem->getName()}"{/if}
                                            >
                                                <span>
                                                    {if $oItem->getURLFull() === $homepageUrl}
                                                        <i class="{et_getIcon key="home"}"></i>
                                                    {elseif $oItem->getName() !== null}
                                                        {$oItem->getName()}
                                                    {elseif !empty($Suchergebnisse->getSearchTermWrite())}
                                                        {$Suchergebnisse->getSearchTermWrite()}
                                                    {/if}
                                                </span>
                                                {if $withStructuredData}
                                                    <meta itemprop="name" content="{if $oItem->getName() !== null}{$oItem->getName()|strip_tags|escape:'html'}{elseif !empty($Suchergebnisse->getSearchTermWrite())}{$Suchergebnisse->getSearchTermWrite()|strip_tags|escape:'html'}{/if}" />
                                                    <meta itemprop="item" content="{$oItem->getURLFull()}" />
                                                    <meta itemprop="position" content="{$oItem@iteration}" />
                                                    {if !$linkItem}<meta itemprop="url" content="{$oItem->getURLFull()}" />{/if}
                                                {/if}
                                            </a>
                                        </li>
                                    {/block}
                                {else}{* All other items, not the first and not the last *}
                                    {block name='layout-breadcrumb-item'}
                                        <li class="breadcrumb-item"{if $withStructuredData} itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"{/if}>
                                            <a class="breadcrumb-link link-discreet"
                                                {if $linkItem}
                                                    href="{$oItem->getURLFull()}"
                                                    target="_self"
                                                    {if $withStructuredData}itemprop="url"{/if}
                                                {else}
                                                    aria-current="page"
                                                {/if}
                                               {if $oItem->getURLFull() === $homepageUrl}aria-label="{sanitizeTitle title=$oItem->getName()}"{/if}
                                            >
                                                <span>{if $oItem->getURLFull() === $homepageUrl}<i class="{et_getIcon key="home"}"></i>{else}{$oItem->getName()}{/if}</span>
                                                {if $withStructuredData}
                                                    <meta itemprop="name" content="{$oItem->getName()|strip_tags|escape:'html'}" />
                                                    <meta itemprop="item" content="{$oItem->getURLFull()}" />
                                                    <meta itemprop="position" content="{$oItem@iteration}" />
                                                    {if !$linkItem}<meta itemprop="url" content="{$oItem->getURLFull()}" />{/if}
                                                {/if}
                                            </a>
                                            <i class="breadcrumb-divider {et_getIcon key="breadcrumbDivider"}" aria-hidden="true"></i>
                                        </li>
                                    {/block}
                                {/if}
                            {/foreach}
                        {/block}
                    </ol>
                </nav>
            </div>
            <div class="col navigation-arrows">
                {et_getSetting section='AreaProduct' assign='etProductSettings'}
                {if !empty($NavigationBlaettern) && $etProductSettings.showNavigation}
                    {block name='layout-header-product-pagination'}
                        {if isset($NavigationBlaettern->vorherigerArtikel->kArtikel)}
                            <a  class="btn btn-link"
                                href="{$NavigationBlaettern->vorherigerArtikel->cURLFull}"
                                title="{sanitizeTitle title=$NavigationBlaettern->vorherigerArtikel->cName}"
                                aria-label="{lang section='productDetails' key='previousProduct'}: {$NavigationBlaettern->vorherigerArtikel->cName}"
                            >
                                <span class="{et_getIcon key="navigationPrevious"}"></span>
                            </a>
                        {/if}
                        {if isset($NavigationBlaettern->naechsterArtikel->kArtikel)}
                            <a  class="btn btn-link"
                                href="{$NavigationBlaettern->naechsterArtikel->cURLFull}"
                                title="{sanitizeTitle title=$NavigationBlaettern->naechsterArtikel->cName}"
                                aria-label="{lang section='productDetails' key='nextProduct'}: {$NavigationBlaettern->naechsterArtikel->cName}"
                            >
                                <span class="{et_getIcon key="navigationNext"}"></span>
                            </a>
                        {/if}
                    {/block}
                {/if}
            </div>
        </div>
    {/if}
    {/strip}
{/block}
