The code that you provided above should work, if you are using the new XML schema and you have a node with a node name of nicename. But remember that the name is casesensitive.
I have just tested your code on a v4.5.2, and it outputs the content in the if-statement if I'm on a page that has a parent or ancestor with the name that I provided in the select.
Could you double check that you have spelled the name right.
get nodename in xslt
This should be an easy one:
I am trying to check for a nodename like this:
<xsl:if test="$currentPage/ancestor-or-self::*[@isDoc and @nodeName='nicename']">
do something
</xsl:if>
I find a lot of sample showing that i can use;
@nodeName = 'peoples'
But that does not work anymore so it seems.
If i use @id then it works, but i want to use the name. Anyone? Thanks! :)
Hi Brian
The code that you provided above should work, if you are using the new XML schema and you have a node with a node name of nicename. But remember that the name is casesensitive.
I have just tested your code on a v4.5.2, and it outputs the content in the if-statement if I'm on a page that has a parent or ancestor with the name that I provided in the select.
Could you double check that you have spelled the name right.
/Kim A
Ah yes. it was "Nicename" not "nicename".
Thanks alot for clearing it up for me, I thought the syntax had changed.
/Brian
Hehe, that's okay :) One of those mistakes that easy to make. But now you'll probably not make this excact "mistake" so many times in the future :D
Glad it worked out for you.
/Kim A
is working on a reply...