<!-- if it's a branch recurse through it's children--> <xsl:if test="((($isBranch = 1 and $recurse = 1) or ($walkChildren = 1 and $pseudoCurrentPage/descendant-or-self::*[@isDoc] [@id = $currentNodeID]/child::*[@isDoc])) and $maxMenuDepth > $calculatedMenuDepth)">
I'm sure there is a better way to solve it. XSLT is not my strongest card. Just a heads up.
<!--Is the node a branch? i.e. are there children and is it in the colletion of ancestor nodes --> <xsl:variable name="isBranch"> <xsl:choose> <xsl:when test="$currentPage/ancestor-or-self::*[@isDoc][@id = $currentNodeID]/child::*[@isDoc]">1</xsl:when> </xsl:choose> </xsl:variable>
If all descendent pages are hidden
The script still renders an empty sub navigation list. I solved it by adding this test:
To this statement:
I'm sure there is a better way to solve it. XSLT is not my strongest card. Just a heads up.
Added the test to this block to:
is working on a reply...