Dropdown menus trouble Options
vishal
Posted: Wednesday, July 23, 2008 6:17:22 AM
Rank: Newbie

Joined: 7/8/2008
Posts: 2
Location: Fiji
Hi guys

I am a newbie and have trouble with displaying my dropdown menus. This is my site structure

content
- Home
--- term 1
----- session 1
--- term 2
----- session 2

I want display submenus in term 1 and term 2.

The following is my code

Code:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">


<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:param name="currentPage"/>

<xsl:template match="/">

<!-- start writing XSLT -->

<ul id="Navi">
<xsl:for-each select="$currentPage/ancestor::root/node [string(./data [@alias='umbracoNaviHide']) != '1']">
    <li>
        <xsl:if test="$currentPage/@id=current()/@id">
            <xsl:attribute name="class">Selected</xsl:attribute>
        </xsl:if>
        <a href="{umbraco.library:NiceUrl(@id)}">
            <xsl:attribute name="title"><xsl:value-of select="@nodeName" /></xsl:attribute>
            <xsl:value-of select="@nodeName" />
        </a>
    </li>
</xsl:for-each>

<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=1]/node [string(./data [@alias='umbracoNaviHide']) != '1']">
    <li>
        <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
            <xsl:attribute name="class">Selected</xsl:attribute>
        </xsl:if>
        <a href="{umbraco.library:NiceUrl(@id)}">
            <xsl:attribute name="title"><xsl:value-of select="@nodeName" /></xsl:attribute>
            <xsl:value-of select="@nodeName" />
        </a>
        <ul>
            <xsl:for-each select="./descendant::node [@level=3]/node [string(./data [@alias='umbracoNaviHide']) != '1']">
                <li>
                    <xsl:if test="$currentPage/node/@id = current()/@id">
                        <xsl:attribute name="class">Selected</xsl:attribute>
                    </xsl:if>
                    <a href="{umbraco.library:NiceUrl(@id)}"><xsl:attribute name="title"><xsl:value-of select="@nodeName" /> </xsl:attribute><xsl:value-of select="@nodeName" />
                    </a>
                </li>
            </xsl:for-each>
        </ul>
    </li>
</xsl:for-each>
</ul>


</xsl:template>

</xsl:stylesheet>


Please help me out here.
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.