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
Hi,
Hi have around 50 images in side media folder (media/pictures).
In xslt i want to access all the 50 images and display the image. How can I loop through the images in the folder?
Thanks,
aradhya
Hi Aradhya
You need to use the GetMedia library function, and pass true() as the second parameter to recursively get the media under the media node you have requested.
E.g. if 1542 was the id of your media folder (or the output of a mediapicker)
<xsl:variable name="mediaItems" select="umbraco.library:GetMedia(1542, true())"/><xsl:for-each select="$mediaItems/node"> <img src="{current()/data[@alias='umbracoFile']}" /> </xsl:for-each>
Hope this helps,Dan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Accessing all the images from media folder.
Hi,
Hi have around 50 images in side media folder (media/pictures).
In xslt i want to access all the 50 images and display the image. How can I loop through the images in the folder?
Thanks,
aradhya
Hi Aradhya
You need to use the GetMedia library function, and pass true() as the second parameter to recursively get the media under the media node you have requested.
E.g. if 1542 was the id of your media folder (or the output of a mediapicker)
Hope this helps,
Dan
is working on a reply...