I am trying to use this for an image gallery (I haven't found anything better that you can use to add an endless amount of images). I am using Umbraco 4.6 but with the old XSLT schema but the default XSLT that comes with it just displays a list of the image names and the URL points to #
Can anyone help me modify the XSLT so that it displays an image, I assume I am going to need some sort of umbraco.library:GetMedia command but can't work out exactly what it is,
Displaying image for gallery
Hi,
I am trying to use this for an image gallery (I haven't found anything better that you can use to add an endless amount of images). I am using Umbraco 4.6 but with the old XSLT schema but the default XSLT that comes with it just displays a list of the image names and the URL points to #
Can anyone help me modify the XSLT so that it displays an image, I assume I am going to need some sort of umbraco.library:GetMedia command but can't work out exactly what it is,
Regards
Tony
Sure, people can help, but may be nice to give us a starting point... Get your code here and we'll be glad to help.
Anyway, if you want to retieve a single image from the media section, use
where $nodeId is the id of the media item. Second param is useful if you want to retrieve all images from a folder in a single call (use true())
GetMedia returns a xml fragment which you can query using xpath.
If using the old schema, you should be able to get the image file path using
If using the nex schema, use
All examples should be used from within xslt!
Hope this helps.
Regards,
/Dirk
is working on a reply...