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
I have an .xslt which places an image fine...however, when no image is selected I get the above error: "Error parsing XSLT file:"
My code is now as below...can anyone help me with an if statement preventing the error when no image is selected in the media picker?
<!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" exclude-result-prefixes="msxml umbraco.library"><xsl:output method="xml" omit-xml-declaration="yes"/><xsl:param name="currentPage"/><xsl:variable name="imgSource" select="umbraco.library:GetMedia($currentPage/data[@alias='ProductLink1'], 'false')/data [@alias = 'umbracoFile']" /><xsl:template match="/"> <img src="{$imgSource}" /> </xsl:template></xsl:stylesheet>
Please refer to Lee Kelleher's blog post on how to use GetMedia properly.
Thank you so much...problem solved!!!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Error parsing XSLT file: When no image is selected in Media Picker
I have an .xslt which places an image fine...however, when no image is selected I get the above error: "Error parsing XSLT file:"
My code is now as below...can anyone help me with an if statement preventing the error when no image is selected in the media picker?
Please refer to Lee Kelleher's blog post on how to use GetMedia properly.
Thank you so much...problem solved!!!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.