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 for some reason this doesnt validate in the umbraco xslt editor in the backend:
<xsl:template match="/"> <xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1']"> <xsl:value-of disable-output-escaping="yes" select="umbraco.library:RenderTemplate(@id)"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
but this does
<xsl:template match="/"> <xsl:for-each select="$currentPage/node [string(data [@alias='umbracoNaviHide']) != '1']/node"> <xsl:value-of disable-output-escaping="yes" select="umbraco.library:RenderTemplate(@id)"/> </xsl:for-each> </xsl:template> </xsl:stylesheet>
The only difference is the lower example iteration ends with a '/node'.
I changed the xslt manually in VS and it works fine. But when I try to edit via the backend i get the yellow notifyer saying "xslt could not be saved"
Does anyone have an idea what could be causing this?
The solution in question runs on umbraco v 4.0.2.1
Cheers
Sune
Hi Sune, I'm not sure why you get different behavior in the 2 scenarios, but you may have to wrap the value-of ... RenderTemplate function in an if-statement testing that @id in not empty
<xsl:if test="@id != ''">...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with umbraco.library:RenderTemplate?
Hi for some reason this doesnt validate in the umbraco xslt editor in the backend:
but this does
The only difference is the lower example iteration ends with a '/node'.
I changed the xslt manually in VS and it works fine. But when I try to edit via the backend i get the yellow notifyer saying "xslt could not be saved"
Does anyone have an idea what could be causing this?
The solution in question runs on umbraco v 4.0.2.1
Cheers
Sune
Hi Sune, I'm not sure why you get different behavior in the 2 scenarios, but you may have to wrap the value-of ... RenderTemplate function in an if-statement testing that @id in not empty
<xsl:if test="@id != ''">...
is working on a reply...