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
<xsl:value-of select="$currentPage/descendant::node[@nodeTypeAlias='product']/@id"/>
return nothing on the root node in umbraco version 4.6.1
I think this issue is becouse of the version.
Please suggest me what would be change in above xslt to get the product node property
Structure
Home
Product
News
Hi rajeev,
The new XML Schema (search for it here on Our) is a lot simpler - your snippet looks like this:
<xsl:value-of select="$currentPage/descendant::product[@isDoc]/@id" />
Make sure to get the casing right - if the alias is "Product" you need to use that
/Chriztian
Hi Rajeev
That's because the sample you're using is for the legacy XML schema. (Since v4.5 of Umbraco the XML schema has changed - the syntax you're using is pre v.4.5)
To see the XML structure you're trying to match make a copy-of like this
<textarea>
<xsl:copy-of select="$currentPage/descendant::*[@isDoc]" />
</textarea>
This should give you a notion of the structure.
In the sample I think you could actually do something like this since you only want the specific document type of "product", right?
<xsl:value-of select="$currentPage/product/@id />
Does this help?
/Jan
Beaten by the majestro once again, you rock Chriztian ;-)
Your explanation was more detailed, though - I just opted for the close-to-LMGTFY solution :-)
PS: With your current karma-score I wouldn't necessarily call it "beaten" either... :-)
Thanks for everyone. Both solutions of Crhiztian and Jan were very helipful for me.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to get node property in umbraco 4.6.1
<xsl:value-of select="$currentPage/descendant::node[@nodeTypeAlias='product']/@id"/>
return nothing on the root node in umbraco version 4.6.1
I think this issue is becouse of the version.
Please suggest me what would be change in above xslt to get the product node property
Structure
Home
Product
News
Hi rajeev,
The new XML Schema (search for it here on Our) is a lot simpler - your snippet looks like this:
Make sure to get the casing right - if the alias is "Product" you need to use that
/Chriztian
Hi Rajeev
That's because the sample you're using is for the legacy XML schema. (Since v4.5 of Umbraco the XML schema has changed - the syntax you're using is pre v.4.5)
To see the XML structure you're trying to match make a copy-of like this
<textarea>
<xsl:copy-of select="$currentPage/descendant::*[@isDoc]" />
</textarea>
This should give you a notion of the structure.
In the sample I think you could actually do something like this since you only want the specific document type of "product", right?
<xsl:value-of select="$currentPage/product/@id />
Does this help?
/Jan
Beaten by the majestro once again, you rock Chriztian ;-)
/Jan
Your explanation was more detailed, though - I just opted for the close-to-LMGTFY solution :-)
/Chriztian
PS: With your current karma-score I wouldn't necessarily call it "beaten" either... :-)
Thanks for everyone. Both solutions of Crhiztian and Jan were very helipful for me.
is working on a reply...