Last active
April 17, 2020 11:26
-
-
Save onza/e6a6f89cc7d79c7f987eb3c0476dfc6b to your computer and use it in GitHub Desktop.
Fluid Nav, bestimmte Seite der Hauptnavi soll dabei kein Untermenü haben.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Seite mit der ID "4" soll kein Untermenü haben: | |
<f:spaceless> | |
<div class="scroller offset js-offset"> | |
<div class="navbar__mainnav"> | |
<nav aria-label="main navigation"> | |
<ul> | |
<f:for each="{homePage}" as="homePageItem"> | |
<li {f:if(condition:'{homePageItem.current}', then: 'class="act"')}> | |
<a href="{homePageItem.link}" title="{homePageItem.title}" {f:if(condition:'{homePageItem.current}', then: 'aria-current="page"')}>{homePageItem.title}</a> | |
</li> | |
</f:for> | |
<f:for each="{mainNav}" as="mainNavItem"> | |
<f:if condition="{mainNavItem.active},{mainNavItem.current}"> | |
<f:then> | |
<li class="act"> | |
</f:then> | |
<f:else> | |
<li> | |
</f:else> | |
</f:if> | |
<a href="{mainNavItem.link}" title="{mainNavItem.title}" {f:if(condition:'{mainNavItem.current}', then: 'aria-current="page"')}>{mainNavItem.title}</a> | |
<f:if condition="{mainNavItem.children}"> | |
<f:if condition="{mainNavItem.data.uid} != 4"> | |
<f:render section="subNav" arguments="{subNav: mainNavItem.children}" /> | |
</f:if> | |
</f:if> | |
</li> | |
</f:for> | |
</ul> | |
</nav> | |
</div> | |
</div> | |
</f:spaceless> | |
<f:spaceless> | |
<f:section name="subNav"> | |
<ul> | |
<f:for each="{subNav}" as="subNavItem"> | |
<li | |
<f:if condition="{subNavItem.active},{subNavItem.current}"> | |
<f:then> | |
class="{f:if(condition:'{subNavItem.active},{subNavItem.current}', then: 'act')}"> | |
</f:then> | |
<f:else> | |
> | |
</f:else> | |
</f:if> | |
<a href="{subNavItem.link}" title="{subNavItem.title}" {f:if(condition:'{subNavItem.current}', then: 'aria-current="page"')}>{subNavItem.title}</a> | |
</li> | |
</f:for> | |
</ul> | |
</f:section> | |
</f:spaceless> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment