Trying to make an accordion menu with 1 sub level but I'm kind of stuck, i got the following content tree:
Code:
-|Main
--|Home
--|About
---|item1
---|item2
--|contact
and i've got the following xslt:
Code:
<xsl:param name="currentPage"/>
<xsl:template match="/">
<ul>
<xsl:for-each select="$currentPage/ancestor::root/node[@nodeName='Main']/node">
<li><a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a>
<xsl:if test="$currentPage/@id=current()/@id">
<ul>
<xsl:for-each select="current()/node">
<li><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>
now when i activatenothe i get the 3 items, when i click Home it makes "about" and "contact" his subitems
when i click "about" i get the correct foldout
and when i click contact it shows the 3 1st lvl items as it should...
can any1 point me in the right direction?
When you find yourself on the side of majority, it's time to pauze and reflect