Here's how you should do it, using umbraco.library:GetXmlNodeById:
<xsl:variable name="pickedPage" select="umbraco.library:GetXmlNodeById(courseClassroomResource)" /> <xsl:if test="not($pickedPage/error)"> <!-- make sure the page still exist --> Name of picked page: <xsl:value-of select="$pickedPage/@nodeName"/> And whatever other properties... <xsl:value-of select="$pickedPage/someProperty" /> </xsl:if>
XSLT, Content Picker, get Properties
I am using the content picker to choose a content page from another page in the content tree.
In my XSLT I am trying to get a property from my chosen Node I chose from my content picker.
I am able to output the ID of the node by using
<xsl:value-of select="umbraco.library:GetXmlNodeCurrent()/courseClassroomResource"/>
I set up some custom properties that I would like to pull from the node. Like... "My Page Title".
I thought I would be able to get my property by doing
<xsl:value-of select="umbraco.library:GetXmlNodeCurrent()/courseClassroomResource/myPageTitle"/>
But this outputs nothing on the page.
Does anyone have any ideas why this may be happening or can anyone point me in the right direction?
Thanks.
Hi,
Here's how you should do it, using umbraco.library:GetXmlNodeById:
-Tom
is working on a reply...