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,
I have an Xslt file containing
<xsl:choose> <xsl:when test="count(./propertyImages/MultiNodePicker/nodeId) > 0"> <xsl:variable name="media" select="umbraco.library:GetMedia(./propertyImages/MultiNodePicker/nodeId[1], false())" /> <img src="ImageGen.ashx?width=183&height=183&image={$media/umbracoFile}" /> </xsl:when> <xsl:otherwise> <img src="ImageGen.ashx?width=183&height=183&image=/images/placeholder.png" /> </xsl:otherwise></xsl:choose>
however I can't get ImageGen to work. Just putting
<img src="{$media/umbracoFile}" />
displays the image so I know the xslt is getting the correct path. I just need to resize it!
any ideas what I've done wrong? This code works perfectly in other areas of my site so i'm a bit confused!
thanks
Rachael
Hi. It seems that you simply generate a relative url. Try to write src="/ImageGen.ashx?blablabla" (with a slash in the beginning of the url).
had tried everything but that!
Thank you, that's the second time you've saved me from going mad :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
ImageGen will only work on some pages
Hi,
I have an Xslt file containing
<xsl:choose>
<xsl:when test="count(./propertyImages/MultiNodePicker/nodeId) > 0">
<xsl:variable name="media" select="umbraco.library:GetMedia(./propertyImages/MultiNodePicker/nodeId[1], false())" />
<img src="ImageGen.ashx?width=183&height=183&image={$media/umbracoFile}" />
</xsl:when>
<xsl:otherwise>
<img src="ImageGen.ashx?width=183&height=183&image=/images/placeholder.png" />
</xsl:otherwise>
</xsl:choose>
however I can't get ImageGen to work. Just putting
<img src="{$media/umbracoFile}" />
displays the image so I know the xslt is getting the correct path. I just need to resize it!
any ideas what I've done wrong? This code works perfectly in other areas of my site so i'm a bit confused!
thanks
Rachael
Hi. It seems that you simply generate a relative url. Try to write src="/ImageGen.ashx?blablabla" (with a slash in the beginning of the url).
had tried everything but that!
Thank you, that's the second time you've saved me from going mad :)
is working on a reply...