Hi, Im new to Umbraco and this forum. Can anybody give me the xslt code for a 3 level menu like the below or point me in the right direction where I can find it. Or should I be using Superfish instead?
<!-- The fun starts here --> <ul class="menuH decor1"> <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li class="arrow"> <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a> <xsl:if test="count(./* [@isDoc and string(umbracoNaviHide) != '1']) > 0"> <ul> <xsl:for-each select="./* [@isDoc and string(umbracoNaviHide) != '1']"> <li class="arrow"> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul> </xsl:if> </li> </xsl:for-each> </ul> </xsl:template>
This should list level two nodes and if the level two nodes have any children these will be printed. You can change which levels of that should be printed by change these two lines.
xslt for 3 level dropdown menu
Hi, Im new to Umbraco and this forum. Can anybody give me the xslt code for a 3 level menu like the below or point me in the right direction where I can find it. Or should I be using Superfish instead?
Thanks in advance.
Colin Watson
<ul class="menuH decor1">
<li><a href="projects.html" class="arrow">Projects</a>
<ul>
<li><a href="projects.html" class="arrow">Residenial</a>
<ul>
<li><a>1</a></li>
<li><a>2</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#2" class="arrow">Contact us</a>
<ul>
<li><a class="arrow">Item 1</a></li>
<li><a class="arrow">Item 2</a></li>
</ul>
</li>
</ul>
Hi Colin,
I will try to help you or at least point you in the right direction.
This should list level two nodes and if the level two nodes have any children these will be printed. You can change which levels of that should be printed by change these two lines.
/Dennis
Dennis thank you. I'll try this and get back to you.
Best regards
Colin
is working on a reply...