If i use the "forceNode" setting in any of my menus the selected state seems to stop working, looking at the rendered code on the page, the link seems to be missing the .selected css if the "forceNode" setting is used.
If i remove the "forceNode" setting from the menu and the selected states works.
Selected State
Hi Tim
If i use the "forceNode" setting in any of my menus the selected state seems to stop working, looking at the rendered code on the page, the link seems to be missing the .selected css if the "forceNode" setting is used.
If i remove the "forceNode" setting from the menu and the selected states works.
(Using the default xsl and css from the download)
just to update, i got it working by changing the forceNode code to:
<xsl:choose>
<xsl:when test="$forceNode = $currentPage/ancestor::node/@id">
<xsl:variable name="currentNode" select="$currentPage [string(data [@alias='umbracoNaviHide']) != '1']"></xsl:variable>
<xsl:call-template name="nodeIterator">
<xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel]" />
<xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($forceNode)"></xsl:variable>
<xsl:call-template name="nodeIterator">
<xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel] [string(data [@alias='umbracoNaviHide']) != '1']" />
<xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
oops sorry...to this:
<xsl:choose>
<xsl:when test="$forceNode = $currentPage/ancestor::node/@id">
<xsl:variable name="currentNode" select="$currentPage [string(data [@alias='umbracoNaviHide']) != '1']"></xsl:variable>
<xsl:call-template name="nodeIterator">
<xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel]" />
<xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="currentNode" select="umbraco.library:GetXmlNodeById($forceNode) [string(data [@alias='umbracoNaviHide']) != '1']"></xsl:variable>
<xsl:call-template name="nodeIterator">
<xsl:with-param name="parentNode" select="$currentNode/ancestor-or-self::node[@level=$startLevel]" />
<xsl:with-param name="pseudoCurrentPage" select="$currentNode" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
Great thanks, for finding the bug and fir fixing it I'll roll your changes into the next release.
Tim
is working on a reply...