Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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,
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
umbraco.library:GetMedia($nodeId, false() | true())
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
umbraco.library:GetMedia($nodeId, false())/data [@alias = 'umbracoFile']
If using the nex schema, use
All examples should be used from within xslt!
Hope this helps.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted