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
Arghh... this should be really simple but can't figure it out. Scouring both the old and new forums and Google turned up nothing new.
I am simply trying to re-use content from an existing node (1087) I thought this macro should do the trick.
A similar technique worked fine on an older version of Umbraco, but not now. Any hints? Am I doing something stupid? Thanks!
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary" exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:value-of select="umbraco.library:GetXmlNodeById(1087)/data [@alias='bodyText']" disable-output-escaping="yes"/>
</xsl:template>
</xsl:stylesheet>
Also tried this from a very OLD copy of Umbraco, didn't work either:
<xsl:value-of select="umbraco.library:GetItem(1087, 'bodyText')" disable-output-escaping="yes"></xsl:value-of>
Hi David,
If the node does indeed exist, try the following instead of your value-of:
<textarea cols="25" rows="20"> <xsl:copy-of select="$currentPage/ancestor-or-self::root//*[@id = 1087]" /> </textarea>
This'll work regardless of XML schema used - check the XML returned - if bodyText is an element of itself, e.g. <bodyText>...</bodyText> you're now using the much better new XML Schema and you can proceed with this:
<xsl:value-of select="$currentPage/ancestor-or-self::root//*[@id = 1087]/bodyText" disable-output-escaping="yes" />
- otherwise, check back here with the contents of the textarea for further scrutiny...
/Chriztian
Hi Chriztian,
Thank you so much. That worked!
Using your textarea trick, the output showed that <bodytext>...</bodytext>was indeed part of the output.
I'd better brush up on this stuff.
Gracias :)
David Duckworth
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
XSLT select no longer works! (Umbraco 4.6.1)
Arghh... this should be really simple but can't figure it out. Scouring both the old and new forums and Google turned up nothing new.
I am simply trying to re-use content from an existing node (1087) I thought this macro should do the trick.
A similar technique worked fine on an older version of Umbraco, but not now. Any hints? Am I doing something stupid? Thanks!
Also tried this from a very OLD copy of Umbraco, didn't work either:
Hi David,
If the node does indeed exist, try the following instead of your value-of:
This'll work regardless of XML schema used - check the XML returned - if bodyText is an element of itself, e.g. <bodyText>...</bodyText> you're now using the much better new XML Schema and you can proceed with this:
- otherwise, check back here with the contents of the textarea for further scrutiny...
/Chriztian
Hi Chriztian,
Thank you so much. That worked!
Using your textarea trick, the output showed that <bodytext>...</bodytext>was indeed part of the output.
I'd better brush up on this stuff.
Gracias :)
David Duckworth
is working on a reply...