Copied to clipboard

Flag this post as spam?

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


  • Ivan 165 posts 543 karma points
    Sep 11, 2012 @ 11:57
    Ivan
    0

    Accessing DAMP properties from within umbraco:item control.

    Hi guys.

    Ho do I access DAMP properites from within umbraco:item server control in Master Template?

    I can easily do the deed in XSLT template, like:

    <img src="{image/DAMP/mediaItem/Image/umbracoFile}" />

    But have no idea how it works in the server control. Any thoughts?

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 11, 2012 @ 12:06
    Jeroen Breuer
    0

    Hello,

    An umbraco item won't work because it will only output id's or xml and you'll need Razor or XSLT to transform that. It can be used in a UserControl, but you'll need some code to transform the id's or xml when you use node.GetProperty("alias").Value in there. DAMP has a helper which can be useful: http://damp.codeplex.com/SourceControl/changeset/view/62425cfc1854#DigibizAdvanceMediaPicker%2fDAMP_Helper.cs. For example the GetUrl method.

    Jeroen

  • Sob 11 posts 41 karma points
    Sep 13, 2012 @ 12:21
    Sob
    0

    @jeroen Hi , I have a similar doubt, i want to show damp cropped image in my template.Is there any way to do it in template or i usually write razor for that.

    Thanks in advance.....

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 13, 2012 @ 12:27
    Jeroen Breuer
    0

    You usually write razor or xslt for that. It can be done in a masterpage if you use a code behind (see #Protip: Creating new templates at http://tech.kipusoep.nl/2010/07/23/umbraco-45-visual-studio-2010-dotless-jquery-vsdoc-squishit-masterpages/), but I think razor or xslt is easier.

    Jeroen

  • Sob 11 posts 41 karma points
    Sep 13, 2012 @ 12:33
    Sob
    0

    @Jeroen Breuer Reply was fast......Thanks .......:)

  • Ivan 165 posts 543 karma points
    Dec 17, 2012 @ 10:51
    Ivan
    0

    Hi guys.

    Is there a chance to access DAMP image using XSLT expression on Umbraco:Item?

    <umbraco:Item field="favicon" runat="server" xslt="what should I type here to access umbracoFile node of DAMP?" />

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Dec 17, 2012 @ 10:58
    Jeroen Breuer
    0

    I've never tried to fetch a DAMP image with inline XSLT so I don't know if that works. I think it's just better to do this in Razor or XSLT. You could try the new umbraco:Image control, but you'll probably need to write a DAMP provider for it.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft