Hi, I have this relatively simple code below which is applying a class "current" to a navigation item if you're on a top level node or one of its childre. For some reason though, its applying the class to ALL top level nodes. Any idea what I'm doing wrong?
Thanks for your help!
Amir
<xsl:param name="currentPage"/>
<!-- Input the documenttype you want here --> <xsl:variable name="level" select="1"/>
Apply class to parent if on child
Hi, I have this relatively simple code below which is applying a class "current" to a navigation item if you're on a top level node or one of its childre. For some reason though, its applying the class to ALL top level nodes. Any idea what I'm doing wrong?
Thanks for your help!
Amir
Of course, the desired behavior was built right into the navigation prototype ;)
You need to check if the currentpage is same as that within the loop of for-each.
Here is modified code of your xslt. Hope this helps
is working on a reply...