Hi! Hope you can help me with this...
My topmenuMy 'frontpage' is selected all the time, and I only want it to be selected when the user is on that page.
Here is the code:
Code:<ul>
<!-- Frontpage-->
<xsl:for-each select="$currentPage/ancestor-or-self::root/node">
<li>
<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
<xsl:attribute name="id">current</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:attribute name="title"><xsl:value-of select="@nodeName"/></xsl:attribute>
<span>
<xsl:value-of select="@nodeName"/>
</span>
</a>
</li>
</xsl:for-each>
<!-- other pages -->
<xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']">
<li><xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
<xsl:attribute name="id">current</xsl:attribute>
</xsl:if>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:attribute name="title"><xsl:value-of select="@nodeName"/></xsl:attribute>
<!-- we're under the item - you can do your own styling here -->
<span>
<xsl:value-of select="@nodeName"/>
</span>
</a>
</li>
</xsl:for-each>
</ul>
Is probably the if-argument that's wrong:
Code:<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
I hope you can help, and thanks in advance!