- Images (Folder) -> This the folder name where we upload all the images.
- Room Type 2
- Images
And then on my content I wanted to select the "Rooms" folder to display all the images under it which means just using the "images" folder to display all the medias inside it. Any ideas how to do it?
The wiki entry that Dennis' links to shows you a great xample of how you should be able to achieve what you're after. Just be aware that the example shows you how to create some kind of a gallery where you can click the thumbnails (created using ImageGen), and then see the full size image. If you don't need this function you can just remove some lines of code in the xslt shown :)
But then if I select the rooms folder, all that is showing is all the room type folder but I need to go down one more level to show all the images. I was thinking of there is an automatic way of checking if there are images in this folder and then if not go to next level folder to check it?
Loop through media contents using xslt
Hi,
In my media section I have this setup.
Hotel 1
- Rooms - (Folder)
- Room Type 1 (Folder)
- Images (Folder) -> This the folder name where we upload all the images.
- Room Type 2
- Images
And then on my content I wanted to select the "Rooms" folder to display all the images under it which means just using the "images" folder to display all the medias inside it. Any ideas how to do it?
Hi Sherry,
I've found a page of Umbraco´s Wiki that describes, how to get images from a specific folder in the media section.
http://our.umbraco.org/wiki/how-tos/xslt-useful-tips-and-snippets/list-images-from-mediafolder-in-umbraco-45-plus
Hope this can be very helpful to find a solution.
/Dennis
Hi Sherry Ann
The wiki entry that Dennis' links to shows you a great xample of how you should be able to achieve what you're after. Just be aware that the example shows you how to create some kind of a gallery where you can click the thumbnails (created using ImageGen), and then see the full size image. If you don't need this function you can just remove some lines of code in the xslt shown :)
/Kim A
But then if I select the rooms folder, all that is showing is all the room type folder but I need to go down one more level to show all the images. I was thinking of there is an automatic way of checking if there are images in this folder and then if not go to next level folder to check it?
Hi again Sherry
So you want to be able to select the Rooms-folder, and then show all of the images in every folder lying below that folder, is that correct?
If that's the case and we don't know how many folders and levels we're having under the Rooms-folder, try changng the for-each to this:
The change is an extra /, which will traverse down the entire tree. Does this make a difference?
/Kim A
is working on a reply...