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 guys,
I tried to find out how to check nodetypeAlias has some value in umbraco 4.5 xslt file
The old syntax: <xsl:when test="$currentPage/@nodeTypeAlias='SomeValue'">
Regards,
Peng
Hi Peng,
You can use the selff:: axis to do this:
<xsl:when test="$currentPage/self::SomeValue"> <!-- do stuff --> </xsl:when>
Note that you use the name without quotes for this!
/Chriztian
Hi Chriztian.
It works.
Many many thanks,
What about when you want all pages (for-each) but not of some spcific types eg:
<xsl:for-each select="$ref/child::* [@isDoc and @nodeTypeAlias != 'SomeValue']">
You could use the 'name()' function, like this...
<xsl:for-each select="$currentPage/*[@isDoc and name() != 'SomeValue']">
Cheers, Lee.
I'd use the self:: axis once again:
<xsl:for-each select="$ref/*[@isDoc and not(self::SomeValue)]" />
I'd only use the name() function if SomeValue was a value in a variable (or referenced from somewhere else).
Chriztian - you are good - XSLT Hero!
Thought something like that should be possible but wasen't sure about how to write it, i'm not a XSLT ninja like u guyz :p
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to check if the nodeTypeAlias has some value
Hi guys,
I tried to find out how to check nodetypeAlias has some value in umbraco 4.5 xslt file
The old syntax: <xsl:when test="$currentPage/@nodeTypeAlias='SomeValue'">
Regards,
Peng
Hi Peng,
You can use the selff:: axis to do this:
Note that you use the name without quotes for this!
/Chriztian
Hi Chriztian.
It works.
Many many thanks,
Peng
What about when you want all pages (for-each) but not of some spcific types eg:
You could use the 'name()' function, like this...
Cheers, Lee.
I'd use the self:: axis once again:
I'd only use the name() function if SomeValue was a value in a variable (or referenced from somewhere else).
/Chriztian
Chriztian - you are good - XSLT Hero!
Thought something like that should be possible but wasen't sure about how to write it, i'm not a XSLT ninja like u guyz :p
is working on a reply...