1 {block name='snippets-categories-mega'}
2 {strip}
3 {block name='snippets-categories-mega-assigns'}
4 {if !isset($i)}
5 {assign var=i value=0}
6 {/if}
7 {if !isset($activeId)}
8 {if $NaviFilter->hasCategory()}
9 {$activeId = $NaviFilter->getCategory()->getValue()}
10 {elseif $nSeitenTyp === $smarty.const.PAGE_ARTIKEL && isset($Artikel)}
11 {$activeId = $Artikel->gibKategorie()}
12 {elseif $nSeitenTyp === $smarty.const.PAGE_ARTIKEL && isset($smarty.session.LetzteKategorie)}
13 {$activeId = $smarty.session.LetzteKategorie}
14 {else}
15 {$activeId = 0}
16 {/if}
17 {/if}
18 {/block}
19 {block name='snippets-categories-mega-categories'}
20 {if $Einstellungen.template.megamenu.show_categories !== 'N'
21 && ($Einstellungen.global.global_sichtbarkeit != 3 || \JTL\Session\Frontend::getCustomer()->getID() > 0)}
22 {get_category_array categoryId=0 assign='categories'}
23 {if !empty($categories)}
24 {if !isset($activeParents)
25 && ($nSeitenTyp === $smarty.const.PAGE_ARTIKEL || $nSeitenTyp === $smarty.const.PAGE_ARTIKELLISTE)}
26 {get_category_parents categoryId=$activeId assign='activeParents'}
27 {/if}
28 {block name='snippets-categories-mega-categories-inner'}
29 {foreach $categories as $category}
30 {if isset($activeParents) && is_array($activeParents) && isset($activeParents[$i])}
31 {assign var=activeParent value=$activeParents[$i]}
32 {/if}
33 {if $category->isOrphaned() === false}
34 {if $category->hasChildren()}
35 {block name='snippets-categories-mega-category-child'}
36 <li class="nav-item nav-scrollbar-item dropdown dropdown-full
37 {if $Einstellungen.template.megamenu.show_categories === 'mobile'} d-lg-none
38 {elseif $Einstellungen.template.megamenu.show_categories === 'desktop'} d-none d-lg-inline-block {/if}
39 {if $category->getID() === $activeId
40 || (isset($activeParent)
41 && $activeParent->getID() === $category->getID())} active{/if}">
42 {link href=$category->getURL()
43 title=$category->getName()|escape:'html'
44 class="nav-link dropdown-toggle"
45 target="_self"
46 data=["category-id"=>$category->getID()]}
47 <span class="nav-mobile-heading">{if isset($category->getAttribute('hasicon'))}<i class="fa fa-cog mr-1"></i>{/if}{$category->getName()}</span>
48 {/link}
49 <div class="dropdown-menu">
50 <div class="dropdown-body">
51 {container class="subcategory-wrapper"}
52 {row class="lg-row-lg nav"}
53 {col lg=4 xl=3 class="nav-item-lg-m nav-item dropdown d-lg-none"}
54 {link href=$category->getURL() rel="nofollow"}
55 <strong class="nav-mobile-heading">{lang key='menuShow' printf=$category->getShortName()}</strong>
56 {/link}
57 {/col}
58 {block name='snippets-categories-mega-sub-categories'}
59 {if $category->hasChildren()}
60 {if !empty($category->getChildren())}
61 {assign var=sub_categories value=$category->getChildren()}
62 {else}
63 {get_category_array categoryId=$category->getID() assign='sub_categories'}
64 {/if}
65 {foreach $sub_categories as $sub}
66 {col lg=4 xl=3 class="nav-item-lg-m nav-item {if $sub->hasChildren()}dropdown{/if}"}
67 {block name='snippets-categories-mega-category-child-body-include-categories-mega-recursive'}
68 {include file='snippets/categories_mega_recursive.tpl' mainCategory=$sub firstChild=true subCategory=$i + 1}
69 {/block}
70 {/col}
71 {/foreach}
72 {/if}
73 {/block}
74 {/row}
75 {/container}
76 </div>
77 </div>
78 </li>
79 {/block}
80 {else}
81 {block name='snippets-categories-mega-category-no-child'}
82 {navitem href=$category->getURL() title=$category->getName()|escape:'html'
83 class="nav-scrollbar-item {if $Einstellungen.template.megamenu.show_categories === 'mobile'} d-lg-none
84 {elseif $Einstellungen.template.megamenu.show_categories === 'desktop'} d-none d-lg-inline-block {/if}
85 {if $category->getID() === $activeId}active{/if}"
86 data=["category-id"=>$category->getID()]}
87 <span class="text-truncate d-block">{if isset($category->getAttribute('hasicon'))}<i class="fa fa-cog mr-1"></i>{/if}{$category->getShortName()}</span>
{/navitem}
{/block}
{/if}
{/if}
{/foreach}
{/block}
{/if}
{/if}
{/block}{* /megamenu-categories*}
{block name='snippets-categories-mega-manufacturers'}
{if $Einstellungen.template.megamenu.show_manufacturers !== 'N'
&& ($Einstellungen.global.global_sichtbarkeit != 3 || JTL\Session\Frontend::getCustomer()->getID() > 0)}
{get_manufacturers assign='manufacturers'}
{if !empty($manufacturers)}
{assign var=manufacturerOverview value=null}
{if isset($oSpezialseiten_arr[$smarty.const.LINKTYP_HERSTELLER])}
{$manufacturerOverview=$oSpezialseiten_arr[$smarty.const.LINKTYP_HERSTELLER]}
{/if}
{block name='snippets-categories-mega-manufacturers-inner'}
<li class="nav-item nav-scrollbar-item dropdown dropdown-full {if $nSeitenTyp === $smarty.const.PAGE_HERSTELLER}active{/if}">
{link href="{if $manufacturerOverview !== null}{$manufacturerOverview->getURL()}{else}#{/if}" title={lang key='manufacturers'} class="nav-link dropdown-toggle" target="_self"}
<span class="text-truncate nav-mobile-heading">
{if $manufacturerOverview !== null && !empty($manufacturerOverview->getName())}
{$manufacturerOverview->getName()}
{else}
{lang key='manufacturers'}
{/if}
</span>
{/link}
<div class="dropdown-menu">
<div class="dropdown-body">
{container}
{row class="lg-row-lg nav"}
{if $manufacturerOverview !== null}
{col lg=4 xl=3 class="nav-item-lg-m nav-item d-lg-none"}
{block name='snippets-categories-mega-manufacturers-header'}
{link href="{$manufacturerOverview->getURL()}" rel="nofollow"}
<strong class="nav-mobile-heading">
{if !empty($manufacturerOverview->getName())}
{$manufacturerTitle = $manufacturerOverview->getName()}
{else}
{$manufacturerTitle = {lang key='manufacturers'}}
{/if}
{lang key='menuShow' printf=$manufacturerTitle}
</strong>
{/link}
{/block}
{/col}
{/if}
{foreach $manufacturers as $mft}
{col lg=4 xl=3 class='nav-item-lg-m nav-item'}
{block name='snippets-categories-mega-manufacturers-link'}
{link href=$mft->getURL() title=$mft->getName()|escape:'html' class='submenu-headline submenu-headline-toplevel nav-link '}
{if $Einstellungen.template.megamenu.show_manufacturer_images !== 'N'
&& (!$isMobile || $isTablet)}
{include file='snippets/image.tpl'
class='submenu-headline-image'
item=$mft
square=false
srcSize='sm'}
{/if}
{$mft->getName()}
{/link}
{/block}
{/col}
{/foreach}
{/row}
{/container}
</div>
</div>
</li>
{/block}
{/if}
{/if}
{/block} {* /megamenu-manufacturers*}
{if $Einstellungen.template.megamenu.show_pages !== 'N'}
{block name='snippets-categories-mega-include-linkgroup-list'}
{include file='snippets/linkgroup_list.tpl' linkgroupIdentifier='megamenu' dropdownSupport=true tplscope='megamenu'}
{/block}
{/if} {* /megamenu-pages*}
{if $isMobile}
{block name='snippets-categories-mega-top-links-hr'}
<li class="d-lg-none"><hr></li>
{/block}
{block name='snippets-categories-mega-wishlist'}
{if $Einstellungen.global.global_wunschliste_anzeigen === 'Y'}
{navitem href="{get_static_route id='wunschliste.php'}" class="wl-nav-scrollbar-item nav-scrollbar-item"}
{lang key='wishlist'}
{badge id="badge-wl-count" variant="primary" class="product-count"}
{if \JTL\Session\Frontend::getWishlist()->getID() > 0}
{\JTL\Session\Frontend::getWishlist()->getItems()|count}
{else}
0
{/if}
{/badge}
{/navitem}
{/if}
{/block}
{block name='snippets-categories-mega-comparelist'}
{if $Einstellungen.vergleichsliste.vergleichsliste_anzeigen === 'Y'}
{navitem href="{get_static_route id='vergleichsliste.php'}" class="comparelist-nav-scrollbar-item nav-scrollbar-item"}
{lang key='compare'}
{badge id="comparelist-badge" variant="primary" class="product-count"}
{count(JTL\Session\Frontend::getCompareList()->oArtikel_arr)}
{/badge}
{/navitem}
{/if}
{/block}
{if $linkgroups->getLinkGroupByTemplate('Kopf') !== null}
{block name='snippets-categories-mega-top-links'}
{foreach $linkgroups->getLinkGroupByTemplate('Kopf')->getLinks() as $Link}
{navitem class="nav-scrollbar-item d-lg-none" active=$Link->getIsActive() href=$Link->getURL() title=$Link->getTitle() target=$Link->getTarget()}
{$Link->getName()}
{/navitem}
{/foreach}
{/block}
{/if}
{block name='layout-header-top-bar-user-settings'}
{block name='layout-header-top-bar-user-settings-currency'}
{if JTL\Session\Frontend::getCurrencies()|count > 1}
<li class="currency-nav-scrollbar-item nav-item nav-scrollbar-item dropdown dropdown-full d-lg-none">
{block name='layout-header-top-bar-user-settings-currency-link'}
{link id='currency-dropdown' href='#' title={lang key='currency'} class="nav-link dropdown-toggle" target="_self"}
{lang key='currency'}
{/link}
{/block}
{block name='layout-header-top-bar-user-settings-currency-body'}
<div class="dropdown-menu">
<div class="dropdown-body">
{container}
{row class="lg-row-lg nav"}
{col lg=4 xl=3 class="nav-item-lg-m nav-item dropdown d-lg-none"}
{block name='layout-header-top-bar-user-settings-currency-header'}
<strong class="nav-mobile-heading">{lang key='currency'}</strong>
{/block}
{/col}
{foreach JTL\Session\Frontend::getCurrencies() as $currency}
{col lg=4 xl=3 class='nav-item-lg-m nav-item'}
{block name='layout-header-top-bar-user-settings-currency-header-items'}
{dropdownitem href=$currency->getURLFull() rel="nofollow" active=(JTL\Session\Frontend::getCurrency()->getName() === $currency->getName())}
{$currency->getName()}
{/dropdownitem}
{/block}
{/col}
{/foreach}
{/row}
{/container}
</div>
</div>
{/block}
</li>
{/if}
{/block}
{/block}
{/if}
{/strip}
{/block}
Zeile 47 und Zeile 87 abgeändert, jedoch hat sich nix angepasst.
Danke