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 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.
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.
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?
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
@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.....
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
@Jeroen Breuer Reply was fast......Thanks .......:)
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?" />
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
is working on a reply...
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.