Copied to clipboard

Flag this post as spam?

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


  • aradhya 11 posts 30 karma points
    Mar 09, 2010 @ 06:49
    aradhya
    0

    Referring image in templates

    Hi,

       How can I refer images (media picker type) in my templates? xslt (macro) is the only way to achieve this?

     

    Thanks,

    Aradhya

  • Tommy Poulsen 514 posts 708 karma points
    Mar 09, 2010 @ 07:49
    Tommy Poulsen
    1

    You can do inline xslt in the template - see the wiki here

    E.g.

    < umbraco:Item runat="server" field="mediaItem"
    xslt="concat('&lt;img src=&quot;', umbraco.library:GetMedia({0},'true')/data[@alias='umbracoFile'], '&quot; /&gt;')"
    xsltDisableEscaping="true" />

    >Tommy


Please Sign in or register to post replies

Write your reply to:

Draft