{extends file="widgets/base/widget.tpl"}
{strip}
    {et_isShopVersionAtLeast value="5.7.0-rc.3" assign='shopIsAtLeast57'}
    {block name="et-widget-container-inner"}
        <div class="row cms-content-wrapper">
            <div class="col-12 order-1{if $et_CmsContent.showNavigation && $Link->getLinkType() !== $smarty.const.LINKTYP_SITEMAP && $Link->getLinkType() !== $smarty.const.LINKTYP_404} order-md-2 col-md-9{/if}">
                {block name='layout-index-link-content'}
                    {if !empty($Link->getContent())}
                        {opcMountPoint id='opc_before_content' inContainer=true}
                        {$Link->getContent()}
                    {/if}
                {/block}
                {block name='layout-index-link-types'}
                    {if $Link->getLinkType() === $smarty.const.LINKTYP_AGB}
                        {block name='layout-index-link-type-tos'}
                            <div id="tos" class="well well-sm">
                                {opcMountPoint id='opc_before_tos' inContainer=true}
                                {if !empty($AGB)}
                                    {if $AGB->cAGBContentHtml}
                                        {$AGB->cAGBContentHtml}
                                    {elseif $AGB->cAGBContentText}
                                        {$AGB->cAGBContentText|nl2br}
                                    {/if}
                                {/if}
                                {opcMountPoint id='opc_after_tos' inContainer=true}
                            </div>
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_WRB}
                        {block name='layout-index-link-type-revocation'}
                            <div id="revocation-instruction" class="well well-sm">
                                {opcMountPoint id='opc_before_revocation' inContainer=true}
                                {if $WRB !== false}
                                    {if $WRB->cWRBContentHtml}
                                        {$WRB->cWRBContentHtml}
                                    {elseif $WRB->cWRBContentText}
                                        {$WRB->cWRBContentText|nl2br}
                                    {/if}
                                {/if}
                                {opcMountPoint id='opc_after_revocation' inContainer=true}
                            </div>
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_WRB_FORMULAR}
                        {block name='layout-index-link-type-revocation-form'}
                            <div id="revocation-form" class="well well-sm">
                                {opcMountPoint id='opc_before_revocation_form' inContainer=true}
                                {if isset($WRB) && $WRB !== false}
                                    {if $WRB->cWRBFormContentHtml}
                                        {$WRB->cWRBFormContentHtml}
                                    {elseif $WRB->cWRBFormContentText}
                                        {$WRB->cWRBFormContentText|nl2br}
                                    {/if}
                                {/if}
                                {opcMountPoint id='opc_after_revocation_form' inContainer=true}
                            </div>
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_DATENSCHUTZ}
                        {block name='layout-index-link-type-data-privacy'}
                            <div id="data-privacy" class="well well-sm">
                                {opcMountPoint id='opc_before_data_privacy' inContainer=true}
                                {if $WRB !== false}
                                    {if $WRB->cDSEContentHtml}
                                        {$WRB->cDSEContentHtml}
                                    {elseif $WRB->cDSEContentText}
                                        {$WRB->cDSEContentText|nl2br}
                                    {/if}
                                {/if}
                                {opcMountPoint id='opc_after_data_privacy' inContainer=true}
                            </div>
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_VERSAND}
                        {block name='layout-index-include-shipping'}
                            {include file='page/shipping.tpl' lazyLoadImages=$et_BaseWidget.lazyLoadImages}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_LIVESUCHE}
                        {block name='layout-index-include-livesearch'}
                            {include file='page/livesearch.tpl'}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_HERSTELLER}
                        {block name='layout-index-include-manufacturers'}
                            {include file='page/manufacturers.tpl' lazyLoadImages=$et_BaseWidget.lazyLoadImages}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_NEWS}
                        {block name='layout-index-include-news'}
                            {include file='blog/overview.tpl' lazyLoadImages=$et_BaseWidget.lazyLoadImages}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_NEWSLETTERARCHIV}
                        {block name='layout-index-include-newsletter-archive'}
                            {include file='page/newsletter_archive.tpl'}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_SITEMAP}
                        {block name='layout-index-include-sitemap'}
                            {include file='page/sitemap.tpl'}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_GRATISGESCHENK}
                        {block name='layout-index-include-free-gift'}
                            {include file='page/free_gift.tpl'}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_PLUGIN && empty($nFullscreenTemplate) && isset($cPluginTemplate)}
                        {block name='layout-index-include-plugin'}
                            {include file=$cPluginTemplate}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_AUSWAHLASSISTENT}
                        {block name='layout-index-include-selection-wizard'}
                            {include file='selectionwizard/index.tpl'}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_404}
                        {block name='layout-index-include-404'}
                            {include file='page/404.tpl'}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_REGISTRIEREN}
                        {block name='layout-index-include-register'}
                            {include file='register/index_content.tpl' inWidget=true}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_PASSWORD_VERGESSEN}
                        {block name='layout-index-include-password'}
                            {include file='account/password_content.tpl' inWidget=true}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_KONTAKT}
                        {block name='layout-index-include-contact'}
                            {include file='contact/index_content.tpl' inWidget=true}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_NEWSLETTER}
                        {block name='layout-index-include-newsletter'}
                            {include file='newsletter/index_content.tpl' inWidget=true}
                        {/block}
                    {elseif $Link->getLinkType() === $smarty.const.LINKTYP_LOGIN && isset($step) && $step === 'mein Konto'}
                        {block name='layout-index-include-myaccount'}
                            <div class="row" id="account">
                                <div class="col col-12">
                                    {include file='account/my_account.tpl' inWidget=true}
                                </div>
                            </div>
                        {/block}
                    {elseif $shopIsAtLeast57 && $Link->getLinkType() === $smarty.const.LINKTYP_ACCESSIBILITY}
                        {block name='layout-index-include-accessibility'}
                            {include file='accessibility/index_content.tpl' inWidget=true}
                        {/block}
                    {elseif $shopIsAtLeast57 && $Link->getLinkType() === $smarty.const.LINKTYP_ONLINE_WRB_FORMULAR}
                        {block name='layout-index-link-type-online-revocation-form'}
                            <div id="online-revocation-form" class="well well-sm">
                                {opcMountPoint id='opc_before_revocation_form' inContainer=true}
                                {include file='snippets/withdrawal_form.tpl'}
                                {if isset($WRB) && $WRB !== false}
                                    <hr class="my-4">
                                    {if $AGB->cAGBContentHtml}
                                        {$AGB->cAGBContentHtml}
                                    {elseif $AGB->cAGBContentText}
                                        {$AGB->cAGBContentText|nl2br}
                                    {/if}
                                    <hr class="my-2">
                                    {if $WRB->cWRBContentHtml}
                                        {$WRB->cWRBContentHtml}
                                    {elseif $WRB->cWRBContentText}
                                        {$WRB->cWRBContentText|nl2br}
                                    {/if}
                                {/if}
                                {opcMountPoint id='opc_after_revocation_form' inContainer=true}
                            </div>
                        {/block}
                    {/if}
                {/block}
            </div>
            {if $et_CmsContent.showNavigation && $Link->getLinkType() !== $smarty.const.LINKTYP_SITEMAP && $Link->getLinkType() !== $smarty.const.LINKTYP_404}
                <div class="col-12 col-md-3 order-2 mt-2 mt-md-0 order-md-1">
                    {if $Einstellungen.news.news_benutzen === 'Y' && isset($oNewsKategorie_arr) && count($oNewsKategorie_arr) > 0}
                        {$newsEntryLimitPerCategory=5}
                        {block name='et-cms-content-news-categories'}
                            {opcMountPoint id='opc_before_news_categories' inContainer=true}
                            <div class="sitemap-wrapper-news-categories">
                                <div class="card sitemap-group">
                                    <div class="card-header">{lang key='sitemapNewsCats'}</div>
                                    <div class="card-body">
                                        {block name='et-cms-content-news-categories-content'}
                                            <div class="row">
                                                {foreach $oNewsKategorie_arr as $oNewsKategorie}
                                                    <div class="col-12">
                                                        {if is_a($oNewsKategorie, 'JTL\News\Category')}
                                                            <strong><a href="{$oNewsKategorie->getURL()}" class="link-discreet" title="{$oNewsKategorie->getName()|strip_tags|escape:'html'}">{$oNewsKategorie->getName()}</a></strong>
                                                            {if $oNewsKategorie->getItems() !== null && count($oNewsKategorie->getItems()) > 0}
                                                                <ul class="list-unstyled">
                                                                    {foreach from=$oNewsKategorie->getItems() item='oNews' name='categoryNews'}
                                                                        {if $smarty.foreach.categoryNews.index < $newsEntryLimitPerCategory}
                                                                            <li>&nbsp;&nbsp;<a href="{$oNews->getURL()}" class="link-discreet">{$oNews->getTitle()}</a></li>
                                                                        {/if}
                                                                        {if $smarty.foreach.categoryNews.index === $newsEntryLimitPerCategory}
                                                                            <li class="et-cms-navigation-more">&nbsp;&nbsp;&nbsp;<a href="{$oNewsKategorie->getURL()}" class="link-discreet" title="{$oNewsKategorie->getName()|strip_tags|escape:'html'}">{lang key="more" section="global"}</a></li>
                                                                        {/if}
                                                                    {/foreach}
                                                                </ul>
                                                            {/if}
                                                        {else}
                                                            <strong><a href="{$oNewsKategorie->cURLFull}" class="link-discreet" title="{$oNewsKategorie->cName|strip_tags|escape:'html'}">{$oNewsKategorie->cName}</a></strong>
                                                        {/if}
                                                    </div>
                                                {/foreach}
                                            </div>
                                        {/block}
                                    </div>
                                </div>
                            </div>
                        {/block}
                    {/if}
                    <div class="card sitemap-group">
                        <div class="card-header">{lang key='sitemapSites'}</div>
                        <div class="card-body">
                            {block name='et-cms-content-pages-content'}
                                <div class="row">
                                    {foreach $linkgroups as $linkgroup}
                                        {if !empty($linkgroup) && !empty($linkgroup->getName()) && $linkgroup->getName() !== 'hidden' && !empty($linkgroup->getLinks()) && !$linkgroup->getLinks()->isEmpty()}
                                            <div class="col-12">
                                                <ul class="nav flex-column">
                                                    {block name='et-cms-content-include-linkgroup-list'}
                                                        {include file='snippets/linkgroup_list.tpl' linkgroupIdentifier=$linkgroup->getTemplate() tplscope='sitemap'}
                                                    {/block}
                                                </ul>
                                            </div>
                                        {/if}
                                    {/foreach}
                                </div>
                            {/block}
                        </div>
                    </div>
                </div>
            {/if}
        </div>
    {/block}
{/strip}