Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hello everybody,
i know how to mark the active navigation point of one site.
But how can i mark always the top navigation point of each subnavigation item.
For example
- Item 1 - Item 1.1 - Item 1.2
If i click on Item 1.2 The main navigation point "Item 1" should be marked as "selected"
Thanks
Hi Dominik
You should be able to achieve this by making this test:
<xsl:attribute name="class"> <xsl:if test="@id = $currentPage/ancestor-or-self::node/@id"> <xsl:text>active</xsl:text> </xsl:if> </xsl:attribute>How does your XSLT look like for now?
/Jan
Hi Jan,
Your script also marks only the top if the item is the first subnavigation point.
It does not work if I use another subnavigation point
Regards
oh i fixed it by using
<xsl:if test="current()/@id = $currentPage/ancestor-or-self::*/@id">
Oops, should have been aware of posting two examples using either old or new schema.
But you figured it out, so that's good :-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
mark top navigation point
hello everybody,
i know how to mark the active navigation point of one site.
But how can i mark always the top navigation point of each subnavigation item.
For example
- Item 1
- Item 1.1
- Item 1.2
If i click on Item 1.2 The main navigation point "Item 1" should be marked as "selected"
Thanks
Hi Dominik
You should be able to achieve this by making this test:
<xsl:attribute name="class">
<xsl:if test="@id = $currentPage/ancestor-or-self::node/@id">
<xsl:text>active</xsl:text>
</xsl:if>
</xsl:attribute>
How does your XSLT look like for now?
/Jan
Hi Jan,
Your script also marks only the top if the item is the first subnavigation point.
It does not work if I use another subnavigation point
Regards
oh i fixed it by using
<xsl:if test="current()/@id = $currentPage/ancestor-or-self::*/@id">
Oops, should have been aware of posting two examples using either old or new schema.
But you figured it out, so that's good :-)
/Jan
is working on a reply...