The id I need is the very first (1192 and 1193 (every gallery created with GalleryItem), but I can't find a way to get it right :-/
The structure is: GalleryPage/GalleryItem Currentpage is GalleryPage
The images are picked with the Media Picker for every folder. The alias for the Media Picker is blaaahFolder (sorry for the odd naming-scheme - it's just a temporary solution...).
Link to parent doctype from for-each
Hi.
My problem is that I can't find a way to link to GalleryItem from within the inner for-each which is creating the link to the specific gallery.
Here's the XSLT (stripped down from everything unnesseceary):
The output from a copy-of is:
The id I need is the very first (1192 and 1193 (every gallery created with GalleryItem),
but I can't find a way to get it right :-/
The structure is: GalleryPage/GalleryItem
Currentpage is GalleryPage
The images are picked with the Media Picker for every folder. The alias for the Media Picker is blaaahFolder (sorry for the odd naming-scheme - it's just a temporary solution...).
Hi Stefan,
You can grab that ID before going into the second loop:
/Chriztian
PS: Would be a good idea to rename the Folder variable to Folders (plural) - threw me off the track for a coouple of minutes :-)
Hi,
If I understand right, you need to get the ID of the GalleryFolder from within a nested for-each, right?
To do this I think the only way is to store what you need in a variable outside the second for-each:
Hope this helps,
Tom
You finally beat me :(
Thank you for your answers. I have now tried both, and it is still not working as I expect it to.
This is the output from <textarea><xsl:copy-of select="$Folders" />textarea> from within the for-each statement:
Please note that copy-of generates two textareas with the exact same content as below (there is a total of two GalleryItem entries).
The result from this is that the first id is selected for both gallery entries.
blaaah is the content (images) of a gallery entry (GalleryItem) and blaaahFolder is the selected image for the gallery listing (on currentPage).
Sorry guys, I think I was sleeping when trying to get this to work.
Sometimes it just helps to get away from the problem ;-)
is working on a reply...