The GetMedia call returns an XML nodeset of the entire Media item - including it's file path, size, extension, etc. In most cases you just want the file path so you can display the image, to get that you would look for the umbracoFile property
Try dumping the contents of GetMedia into a textbox, so we can ensure we are getting the right XML back and umbracoFile is there. You can do this by pasting the following in your XSLT
Ok, I'm a bit confused...do you know if you are using the new or old XSLT schema? Your XSLT to call the SliderImage field is in the old format (data [@alias='SliderImage']) but your Media seems to be in the new format (umbracoFile instead of data [@alias='umbracoFile'])...
Anyway, this should work, although it seems something strange is going on:
GetMedia XSLT / NiceURL issue?
The URL Im getting is returning as :
/media/1115/bg_promo_visual_01.png553508321953png
This is the XSLT Im using:
<xsl:value-of select="umbraco.library:GetMedia(data [@alias = 'SliderImage'],'false')"/>
The XML being returned for the page is..
slider
items
item
data alias=SliderImage>1121 /data
Help? Having problems getting the correct URL... XSL Noob ..
Hi
Try this:
Hi,
The GetMedia call returns an XML nodeset of the entire Media item - including it's file path, size, extension, etc. In most cases you just want the file path so you can display the image, to get that you would look for the umbracoFile property
Ex:
Hope this helps,
Tom
trying to set an inline style sheet ... background url.. I've tried the umbracoFile and without any luck... displays blank when I do that.
Try dumping the contents of GetMedia into a textbox, so we can ensure we are getting the right XML back and umbracoFile is there. You can do this by pasting the following in your XSLT
Paste the contents of the textbox here.
-Tom
Okay, from the textbox result it appears as though I got data returned:
Hi,
Ok, I'm a bit confused...do you know if you are using the new or old XSLT schema? Your XSLT to call the SliderImage field is in the old format (data [@alias='SliderImage']) but your Media seems to be in the new format (umbracoFile instead of data [@alias='umbracoFile'])...
Anyway, this should work, although it seems something strange is going on:
-Tom
Thanks Tom, its working nicely.
is working on a reply...