are you sure you are using the old xml schema. Please check the Umbraco Version and if it is 4.5 or higher check the config/umbracoSettings.config there is an element called UseLegacyXmlSchema if the value is set to false you are using the new schema if it is set to true you are using the old schema.
Getting Page content from the node value
Hi all,
I am trying to insert data from another page related to the node that is selected from the content picker
I currently have in my macro which gives me the node value which i want
Now I am stuck with what to put in my template to show content from this page.
A property for the page is called 'mainHeading' so i have tried (with no luck)
Any help on this would be greatly appreciated!
Kelvin
If you are using the content picker it stores only the id of the selected node. So just use
<xsl:copy-of select="umbraco.library:GetXmlNodeById(/macro/link)/data [@alias='mainHeading']" />
as you are using the old xml schema.
hth, Thomas
Hi,
I tried using this and nothing is displayed. Should i not use the old xml schema?
Do you have any other advice?
Thanks
Kelvin
Go step by step.
Hi Thomas,
I have check and the first three work
the code below gives me all the details in the specified node:
<xsl:copy-of select="umbraco.library:GetXmlNodeById(/macro/link)"/>
the page it is using is called Article and has properties which has the alias of mainHeading,subHeading,leftColumn.
leftColumn is a richtext and the others are a textstring. when i complete the code with (below) nothing happens.
<xsl:copy-of select="umbraco.library:GetXmlNodeById(/macro/link)/data [@alias='mainHeading']" />
the last bit of the code isn't working.
Some more help would be great!
Thanks
Kelvin
are you sure you are using the old xml schema. Please check the Umbraco Version and if it is 4.5 or higher check the config/umbracoSettings.config there is an element called UseLegacyXmlSchema if the value is set to false you are using the new schema if it is set to true you are using the old schema.
In the new schema it has then to be:
<xsl:copy-of select="umbraco.library:GetXmlNodeById(/macro/link)/mainHeading" />
just output the xml you get via
<textarea><xsl:copy-of select="umbraco.library:GetXmlNodeById(/macro/link)" /></textarea>
then you can see what xml stucture you have
hth, Thomas
Great!! Thank you this works,
I guess i am confusing the old with the new... Thanks again
<xsl:copy-of select="umbraco.library:GetXmlNodeById(/macro/link)/mainHeading" />
is working on a reply...