It's pretty straight forward oonce you know it - you already have the template that does the actual rendering, you just need to tell the processor to only render Images or the first Image in a Folder - you do that by changing a single line in the "Folder" template:
<ul>
<!-- Render all Images, Files or (sub-)Folders in this folder -->
<xsl:apply-templates select="Image | Folder/Image[1]" />
</ul>
See - you ask for all Image elements in the root Folder and any Image that's the first in a subfolder.
Show 1 thumbnail only on each image folder
Hello, ive been wanting to show 1 thumbnail only on each image folder on my gallery.
Currently im using this Xslt to populate my page with all the folder images and it works well
This is the part where the folder images are populated, it currently show all the images of each folder
Now, what i wanted is instead of show all the images of each folder - i just want it to show just the first image thumbnail of the folder.
Apologies if this is a dumb question, but ive been stuck with this for some hours already and im not that adept with xlst, thanks much in advance.
Hi Frost,
It's pretty straight forward oonce you know it - you already have the template that does the actual rendering, you just need to tell the processor to only render Images or the first Image in a Folder - you do that by changing a single line in the "Folder" template:
See - you ask for all Image elements in the root Folder and any Image that's the first in a subfolder.
Let me know if it needs tweaking...
/Chriztian
Hi Chriztian,
Man you are the best, that did the trick.
I should really know more about xlst.
Thank you much.
is working on a reply...