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
Hi,
On the site I'm currently developing there is a specific section on the site that requires an additional stylesheet loading.
I'm trying to write an <xsl:if> statement which basically says - If current page, ancestor or self has the ID of '1065'
I can't quite get it right though, how could I achieve this?
Thanks!'
In 4.0 it would be something like this I believe:
<xsl:if test="count($currentPage/ancestor-or-self::node[@id = 1065]) > 0">...</xsl:if>
4.5 something like this
<xsl:if test="count($currentPage/ancestor-or-self::*[@isDoc and @id = 1065]) > 0">...</xsl:if>
Haven't actually tested these but they're close if not quite right.
That is spot on, thank you very much!
Glad to help!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Check if current page is a descendant of a certain page?
Hi,
On the site I'm currently developing there is a specific section on the site that requires an additional stylesheet loading.
I'm trying to write an <xsl:if> statement which basically says - If current page, ancestor or self has the ID of '1065'
I can't quite get it right though, how could I achieve this?
Thanks!'
In 4.0 it would be something like this I believe:
4.5 something like this
Haven't actually tested these but they're close if not quite right.
That is spot on, thank you very much!
Glad to help!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.