Skip to content
Code-Schnipsel Gruppen Projekte
Commit 742f7173 erstellt von Dominik Chrzanowski's avatar Dominik Chrzanowski
Dateien durchsuchen

feat: Independent menu works with new options [SlideOut] #22

Übergeordneter 4bde7872
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -5,24 +5,55 @@
{/if}
{if count($children)}
{if $level > 1}
<div class="quiqqer-sub-nav-div {if $collapseMobileSubmenu == 1 and $showLevel < $level}quiqqer-menu-close{/if}">
{/if}
<ul class="page-navigation-level-{$level}">
{foreach from=$children item=Child}
<li>
<a href="{$Child->getUrl()}"
class="qui-menu-siteid-{$Child->getIdentifier()} left-menu-a"
title="{$Child->getTitleAttribute()|escape:'html'}"
{if $Child->getTarget()}target="{$Child->getTarget()}"{/if}
>
{if $this->getAttribute('showFirstLevelIcons') && $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 }
{image src=$Child->getIcon() onlyicon=1}
{/if}
<span class="fa fa-angle-right"></span>
<span class="left-menu-text">
{$Child->getTitle()}
</span>
</a>
<div class="quiqqer-navigation-entry">
<a href="{$Child->getUrl()}"
class="qui-menu-siteid-{$Child->getIdentifier()} left-menu-a"
title="{$Child->getTitleAttribute()|escape:'html'}"
{if $Child->getTarget()}target="{$Child->getTarget()}"{/if}
>
{if count($Child->getChildren())}
{* With children *}
{if $ActiveSite->getId() == $Child->getSite()->getId()}
<span class="fa fa-angle-double-right quiqqer-menu-levels
{if $collapseMobileSubmenu == 0}quiqqer-menu-levels-rotate{/if}
{if $showLevel > $level}quiqqer-menu-levels-rotate{/if}"></span>
{else}
<span class="fa fa-angle-double-right quiqqer-menu-levels
{if $collapseMobileSubmenu == 0}quiqqer-menu-levels-rotate{/if}
{if $showLevel > $level}quiqqer-menu-levels-rotate{/if}"></span>
{/if}
{else}
{* Without children *}
{if $ActiveSite->getId() == $Child->getSite()->getId()}
<span class="fa fa-angle-right"></span>
{else}
<span class="fa fa-angle-right"></span>
{/if}
{/if}
{if $this->getAttribute('showFirstLevelIcons') && $Child->getIcon() && $Child->getIcon()|strpos:'image.php' !== 0 }
{image src=$Child->getIcon() onlyicon=1}
{/if}
<span class="left-menu-text">
{$Child->getTitle()}
</span>
</a>
</div>
{include file="`$FileMenu`"
children=$Child->getChildren()
level=$level
......@@ -30,4 +61,8 @@
</li>
{/foreach}
</ul>
{if $level > 1}
</div>
{/if}
{/if}
<nav class="page-menu" data-qui="{$jsControl}" style="display: none;">
<div class="page-navigation {if !$showHomeLink}page-navigation__noHomeLink{/if}">
{if $showHomeLink}
<a href="{url site=$Project->firstChild()}" class="page-navigation-home">
......@@ -8,7 +9,10 @@
{/if}
{include file="`$FileMenu`"
children=$IndependentMenu->getChildren()
children=$IndependentMenu->getChildren()
ActiveSite=$Site
collapseMobileSubmenu=$collapseMobileSubmenu
showLevel=$showLevel
}
</div>
</nav>
......@@ -40,7 +40,7 @@ public function getBody()
$Engine = QUI::getTemplateManager()->getEngine();
$collapseMobileSubmenu = $this->getAttribute('collapseMobileSubmenu');
$showLevel = $this->getAttribute('showLevel');
$showLevel = $this->getAttribute('showLevel');
$params = [
'this' => $this,
......@@ -52,16 +52,19 @@ public function getBody()
if ($this->getAttribute('menuId')) {
$IndependentMenu = Independent\Handler::getMenu($this->getAttribute('menuId'));
$template = dirname(__FILE__).'/Menu.Independent.html';
$params['FileMenu'] = dirname(__FILE__).'/Menu.Children.Independent.html';
$params['IndependentMenu'] = $IndependentMenu;
$params['showFirstLevelIcons'] = $this->getAttribute('showFirstLevelIcons');
$template = dirname(__FILE__) . '/Menu.Independent.html';
$params['FileMenu'] = dirname(__FILE__) . '/Menu.Children.Independent.html';
$params['IndependentMenu'] = $IndependentMenu;
$params['Site'] = $this->getSite();
$params['collapseMobileSubmenu'] = $collapseMobileSubmenu;
$params['showLevel'] = $showLevel;
$params['showFirstLevelIcons'] = $this->getAttribute('showFirstLevelIcons');
} else {
$template = dirname(__FILE__).'/Menu.html';
$template = dirname(__FILE__) . '/Menu.html';
$params['collapseMobileSubmenu'] = $collapseMobileSubmenu;
$params['showLevel'] = $showLevel;
$params['FileMenu'] = dirname(__FILE__).'/Menu.Children.html';
$params['Site'] = $this->getSite();
$params['showLevel'] = $showLevel;
$params['FileMenu'] = dirname(__FILE__) . '/Menu.Children.html';
$params['Site'] = $this->getSite();
}
$Engine->assign($params);
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren