I'm attempting to create a menu structure that I can manipulate using jquery. I'm ver nearly there, but just need (I guess) an if statement to test whether the current node has children, if it does, tag it with a class "has sub".
Have a look at my answer here for a better (in XSLT terms) way of approaching navigation. (The "drawNodes"-approach hasn't really got anything to do with XSLT - it's much more more akin to C# or PHP :-)
To check whether the current node has any children, you can do this:
<xsl:if test="$currentPage/*[@isDoc][not(umbracoNaviHide = 1)]">
<!-- do stuff -->
</xsl:if>
apply class child nodes
Hi,
I'm attempting to create a menu structure that I can manipulate using jquery. I'm ver nearly there, but just need (I guess) an if statement to test whether the current node has children, if it does, tag it with a class "has sub".
My code so far:
Any help would be much appreciated!
Thanks,
Tom
Hi Tom,
Have a look at my answer here for a better (in XSLT terms) way of approaching navigation. (The "drawNodes"-approach hasn't really got anything to do with XSLT - it's much more more akin to C# or PHP :-)
To check whether the current node has any children, you can do this:
/Chriztian
is working on a reply...