<xsl:param name="currentPage"/> <!-- Input the related links property alias here --> <xsl:variable name="propertyAlias" select="/macro/propertyAlias"/> <xsl:template match="/">
The reason you get this error when saving, is because Umbraco does kind of a test transformation before saving, to test for well-formedness etc. When doing that, there is no document to get the values from, so the call to Item() will fail.
You can do a couple of things to fix it:
1. Check the "Skip errors" box when saving the file
2. Wrap an if statement around that line:
<xsl:if test="$propertyAlias">
...
</xsl:if>
3. If you're not using Canvas mode you can just delete the line, as that's what it's needed for.
Error when saving XSLT-file with parameters
Hey Folks,
I just started my second umbraco and I have run into some problems with my XSLT.
I try to send a parameter, with my XSLT. But when i´m trying to save, my file, I got this error.
I have added this settings in the macro parameters: Alias: PropertyAlias Name: PropertyAlias Type: contentPicker
My XSLT looks like this:
I use the XSLT prototype ReleatedLinks
Can not figure out what I'm doing wrong. Hope some of you can help me.
Best regards,
Dennis Aaen
Hi Dennis,
The reason you get this error when saving, is because Umbraco does kind of a test transformation before saving, to test for well-formedness etc. When doing that, there is no document to get the values from, so the call to Item() will fail.
You can do a couple of things to fix it:
1. Check the "Skip errors" box when saving the file
2. Wrap an if statement around that line:
3. If you're not using Canvas mode you can just delete the line, as that's what it's needed for.
/Chriztian
is working on a reply...