I've created a summary page of all subpages. Everything works fine. Even the images are in place. However, when doing some tests, I noticed that my cropped images aren't used on the page, but the original ones. How do I get the path to the cropped image ? Below the syntax I'm currently using...
Path to cropped image ?
Hi,
I've created a summary page of all subpages. Everything works fine. Even the images are in place. However, when doing some tests, I noticed that my cropped images aren't used on the page, but the original ones. How do I get the path to the cropped image ? Below the syntax I'm currently using...
<xsl:variable name="mediaId" select="number(thumbnail)" />
<xsl:if test="$mediaId > 0">
<xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
<xsl:if test="$mediaNode/umbracoFile">
<img src="{$mediaNode/umbracoFile}" alt="[image]" height="{$mediaNode/umbracoHeight}" width="{$mediaNode/umbracoWidth}" border="2" class="overKAL_thumb"/>
</xsl:if>
</xsl:if>
Any help would be greatfull..
Kind regards
Tim
Hi Tim,
You can get the crop path using $mediaNode/yourCropAlias/crops/crop [@name='yourcropname]/@url
Something like:
Hope this helps,
Tom
Hi Tom,
Thanx for the information. I' didn't work in my case but thanx to you I found a solution... Below the code
<xsl:variable name="mediaNode" select="umbraco.library:GetMedia($mediaId, 0)" />
<xsl:if test="$mediaNode//crop [@name = $myCropName]/@url">
<img src="{$mediaNode//crop [@name = $myCropName]/@url}" alt="Image" />
</xsl:if>
Thanx for your help.
Kind regards
Tim
is working on a reply...