Copied to clipboard

Flag this post as spam?

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


  • manibhadra patel 2 posts 22 karma points
    Oct 08, 2011 @ 08:59
    manibhadra patel
    0

    about dynamic image display in content

    Hi

    I am new to Umbraco. and i some requirement in my learning phase.

    I want to display an image on my page.

    but image should be choosen by user.

    and can be change by user.

    plz guide me regarding the same.

    and if possible give me small sample application with above fuctionality.

    thnx in advance.

  • Rich Green 2246 posts 4008 karma points
    Oct 08, 2011 @ 09:16
    Rich Green
    0

    Hi,

    Welcome to the Umbraco forum!

    To achieve what you need to do you can:

    1) Add any image to the Media section

    2) Add a 'Media Picker' property to your DocType and name it 'mediaItem'

    3) In the template where you want to show your image add this code

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

    4) In your content section select an image from your Media Library with the Media picker.

    Regards

    Rich

  • manibhadra patel 2 posts 22 karma points
    Oct 08, 2011 @ 11:53
    manibhadra patel
    0

    thanx Rich

    Its work gr8 and really helpful for me atleast.

    thnx again.

Please Sign in or register to post replies

Write your reply to:

Draft