Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • sailesh 14 posts 45 karma points
    Aug 10, 2010 @ 01:03
    sailesh
    0

    xslt img media picker

    Hi

    I am running Umbraco 4.5 and am trying to get the media picked image to work in my xslt file

    i have tried all these but none seem to work. The img src is always empty

     <img src="{data [@alias ='iconImage']}" alt="{@nodeName}" class="iconImage"/>

     

    this one was suppose to be for 4.5

    <xsl:variable name="media" select="umbraco.library:GetMedia(iconImage, 0)" />

     <img src="{$media/Image/umbracoFile}" alt="{@nodeName}" />

     

    Tried few others but did not work.

    I have a media picker called iconImage

    Any help.

    Thanks

    Sailesh

  • Paul Blair 466 posts 731 karma points
    Aug 10, 2010 @ 04:46
    Paul Blair
    1

    Close. I suspect you are now using 4.5.1? There was an error in the XSLT for 4.5 that has been corrected so the correct syntax will be :

    <img src="{$media/umbracoFile}" alt="{@nodeName}" />

  • sailesh 14 posts 45 karma points
    Aug 10, 2010 @ 11:55
    sailesh
    0

    Thanks!! That did the trick

  • Jim Lesinski 32 posts 54 karma points
    Aug 26, 2010 @ 20:07
    Jim Lesinski
    0

    I just wanted to say thanks. I upgraded to 4.5 and put the "/Image/umbracofile" out there to get ti to work. When I upgraded to 4.5.1 it broke again. This post helped me sort it out!

    Jim 

  • 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.

Please Sign in or register to post replies