<!-- The fun starts here --> <ul> <li> <a href="/">Start</a></li> <xsl:for-each select="$currentPage/ancestor-or-self::* [@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']"> <li> <a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="count(./*[@isDoc]) = 1"> <xsl:value-of select="umbraco.library:NiceUrl(./node/@id)" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="umbraco.library:NiceUrl(@id)" /> </xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:value-of select="menuTitle"/> </a> </li> </xsl:for-each> </ul>
</xsl:template> </xsl:stylesheet>
why after change "=" to ">" or ">" in line <xsl:when test="count(./*[@isDoc] =1"> i've got error System.OverflowException: Value was either too large or too small for an Int32.?
Have you tried to check the "skip error testing" - even though you get the error in the editor it might be working if you skip the error testing. It has to do with the values first being accessible on runtime I guess...
xsl:when problem
Hi
i'm trying to build menu.
why after change "=" to ">" or ">" in line <xsl:when test="count(./*[@isDoc] =1"> i've got error System.OverflowException: Value was either too large or too small for an Int32.?
What is the value of count(./*[@isDoc]) ?
Hi
Have you tried to check the "skip error testing" - even though you get the error in the editor it might be working if you skip the error testing. It has to do with the values first being accessible on runtime I guess...
/Jan
I think the error occours because you are using the "node" in your xpath. Try changing this line:
To this:
/Kim A
is working on a reply...