{extends file="widgets/base/widget.tpl"}
{strip}
    {block name="et-widget-container-inner"}
        {$columnLayout="col-12 col-sm-6 col-md-4 col-lg-3"}
        {if $Link->getLinkType() !== $smarty.const.LINKTYP_SITEMAP && $Link->getLinkType() !== $smarty.const.LINKTYP_404}
            {block name="et-cms-navigation-headline"}
                {include file="widgets/base/textfield.tpl" value=$et_CmsNavigation.headline type="h2" asRow=true classes="et-widget-headline"}
            {/block}
            <div class="row cms-navigation-wrapper">
                <div class="col-12">
                    {if $Einstellungen.news.news_benutzen === 'Y' && isset($oNewsKategorie_arr) && count($oNewsKategorie_arr) > 0}
                        {block name='page-sitemap-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='page-sitemap-news-categories-content'}
                                            <div class="row">
                                                {foreach $oNewsKategorie_arr as $oNewsKategorie}
                                                    <div class="col {$columnLayout}">
                                                        {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 $oNewsKategorie->getItems() as $oNews}
                                                                        <li>&nbsp;&nbsp;<a href="{$oNews->getURL()}" class="link-discreet">{$oNews->getTitle()}</a></li>
                                                                    {/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='page-sitemap-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 {$columnLayout}">
                                                <ul class="nav flex-column">
                                                    {block name='page-sitemap-include-linkgroup-list'}
                                                        {include file='snippets/linkgroup_list.tpl' linkgroupIdentifier=$linkgroup->getTemplate() tplscope='sitemap'}
                                                    {/block}
                                                </ul>
                                            </div>
                                        {/if}
                                    {/foreach}
                                </div>
                            {/block}
                        </div>
                    </div>
                </div>
            </div>
        {/if}
    {/block}
{/strip}