Skip to content
Code-Schnipsel Gruppen Projekte
SidebarDropDownMenu.Advanced.html 3,8 KiB
Newer Older
    {assign var=level value=1}
    {assign var=level value=$level+1}
{if $level == 1}
    {if $this->getAttribute('showTitle') && $this->getAttribute('frontendTitle')}
        <header class="control-header">
        <h1>{$this->getAttribute('frontendTitle')}</h1>
        </header>
Michael's avatar
Michael committed
    {/if}

    {if $this->getAttribute('content') != ""}
        <div class="control-content">
        {$this->getAttribute('content')}
        </div>
    {/if}
{/if}

{strip}
{assign var=children value=$this->getChildren($Site)}

{if count( $children )}
<ul class="quiqqer-navigation-level-{$level}">
    {if $parentLink}
        {if $level == 1}
        <li class="quiqqer-navigation-li">
            <div class="quiqqer-navigation-entry">
                {if $parentIcon}
                    {if $listType == 'sitePicture'}
                    <div class="quiqqer-navigation-entry-image">
                    {/if}
                        <i class="fa quiqqer-fa-list-icon fa-fw {$parentIcon}"></i>
                    {if $listType == 'sitePicture'}
                    </div>
                    {/if}
                {/if}
                <a href="{url site=$FirstPage}" class="quiqqer-navigation-firstpage quiqqer-navigation-link">
                    {$FirstPage->getAttribute('title')}
                </a>
            </div>
        </li>
        {/if}
    {/if}
    {foreach from=$children item=Child}
    <li class="quiqqer-navigation-li {if $Rewrite->isIdInPath($Child->getId())} active-bgcolor {/if}">
        {assign var=subnavigation value=$this->getChildren($Child)}
        {assign var=sitePicture value=''}
        {if $listType == 'sitePicture'}
            {assign var=sitePicture value='sitePicture-class'}
        {/if}
        <div class="quiqqer-navigation-entry {$sitePicture}
            {if
                $Rewrite->isIdInPath($Child->getId()) &&
                $activeId != $Child->getId() &&
                $level == 1
            } quiqqer-first-li-bg{/if}
Michael's avatar
Michael committed

            {if $activeId == $Child->getId()} quiqqer-navigation-active{/if}">
Michael's avatar
Michael committed

            {assign var=showAllIcons value=true}
            {if $onlyFirstLevelIcons && $level > 1}
                {assign var=showAllIcons value=false}
            {if $showAllIcons}
                {if $listType == 'fontAwesome' && $listIcon}
                    <i class="fa quiqqer-fa-list-icon fa-fw {$listIcon}"></i>
                {/if}

                {if $listType == 'sitePicture'}
                    <div class="quiqqer-navigation-entry-image">
                    {if $Child->getAttribute('image_site')}
                        {image src=$Child->getAttribute('image_site')
                        style="width: 100%; height: auto;"
                        maxwidth="280"}
                    {else}
                        <img src="{$Child->getProject()->getMedia()->getPlaceholder()}" style="width: 100%; height: auto;" />
                    {/if}
                    </div>
Michael's avatar
Michael committed
            <a href="{url site=$Child}" class="quiqqer-navigation-link
            {if !count ( $subnavigation )} quiqqer-navigation-link-no-icon{/if}">
                {$Child->getAttribute('title')}
Michael's avatar
Michael committed
            {if count ( $subnavigation ) && ($level < $levels || $levels == 0)}
                <i class="fa quiqqer-fa-levels-icon {$levelIcon} {if $Rewrite->isIdInPath($Child->getId())} fa-nav-levels-rotate {/if} "></i>
Michael's avatar
Michael committed
        </div>
Michael's avatar
Michael committed
        {if $levels === false || $levels-1 >= $level}
        <div class="quiqqer-sub-nav-div {if !$Rewrite->isIdInPath($Child->getId())}quiqqer-navigation-close{/if}">
Michael's avatar
Michael committed

            {include file=$navTemplate
            Site=$Child
            level=$level
            levels=$levels
            }
Michael's avatar
Michael committed

Michael's avatar
Michael committed
        {/if}