If you are planning to make a drop menu in xslt this should get you working assuming you have your content structured like this
- Content -- Default --- Link 1 --- Link 2
<xsl:variable name="level" select="1"/> <!-- where Level 1 will be Default node -->
<xsl:template match="/">
<!-- The fun starts here --> <ul > <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> <!-- Drop Down Menu -->
<xsl:if test="*[@isDoc][not(umbracoNaviHide = 1)]"> <ul> <xsl:for-each select="./* [@isDoc and string(umbracoNaviHide) !='1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:attribute name="class"> <xsl:if test="*[@isDoc][not(umbracoNaviHide = 1)]"> <xsl:text> subLnk</xsl:text> <!-- Where you will have you child nodes indended --> </xsl:if> </xsl:attribute> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul> </xsl:if><!-- End Of Drop Down Menu --> </li> </xsl:for-each> </ul>
How to create Dynamic menu
Hi guys how can i create a drop menu like in http://www.sandisk.com/
Newly added pages should display in the menu automatically.also how can i write logic for loing page and where should i do that??
Hi,
If you are planning to make a drop menu in xslt this should get you working assuming you have your content structured like this
- Content
-- Default
--- Link 1
--- Link 2
Hope this will help you
is working on a reply...