All of the photo pages contain two properties which are media items, they are two images, one large and one small. I am using the highslide javascript to display the images but that is not really important. What I am trying to achieve is on my Projects page list the name of the child pages each followed by any photos that the child pages of the project pages contain (hope that makes sense). Basically I want the projects page to look like this:
Project A
*Display Photo 1*
*Display Photo 2*
Project B
*Display Photo 3*
*Display Photo 4*
*Display Photo 5*
Project C
*Display Photo 6*
*Display Photo 7*
So far I have the following XSLT but it is not working as I would like, it seems to be displaying all the titles next to each other, then just diplaying the first image from each project like so:
Project A Project B
*Display Photo 1*
*Display Photo 3*
Can anyone point me in the right direction as to what I need to change, it is probably something simple I just cannot work out how I need to structure it to get the result I would like. Thanks
Hi, to get all the photos instead of only the first one in each group, you need to add a nested for-each selecting ./node subnodes. In your current situation you only select the first one in your GetMedia call.
Regarding the positioning of the output I suspect you have some css-magic going on - try removing you spans and divs to see if your output looks correct.
List child node name, then child pages of child node
Hi,
I have got the following structure in an umbraco 4 site:
Projects
- Project A
- Photo 1
- Photo 2
- Project B
- Photo 3
- Photo 4
- Photo 5
- Project C
- Photo 6
- Photo 7
All of the photo pages contain two properties which are media items, they are two images, one large and one small. I am using the highslide javascript to display the images but that is not really important. What I am trying to achieve is on my Projects page list the name of the child pages each followed by any photos that the child pages of the project pages contain (hope that makes sense). Basically I want the projects page to look like this:
Project A
*Display Photo 1*
*Display Photo 2*
Project B
*Display Photo 3*
*Display Photo 4*
*Display Photo 5*
Project C
*Display Photo 6*
*Display Photo 7*
So far I have the following XSLT but it is not working as I would like, it seems to be displaying all the titles next to each other, then just diplaying the first image from each project like so:
Project A Project B
*Display Photo 1*
*Display Photo 3*
Can anyone point me in the right direction as to what I need to change, it is probably something simple I just cannot work out how I need to structure it to get the result I would like. Thanks
Hi, to get all the photos instead of only the first one in each group, you need to add a nested for-each selecting ./node subnodes. In your current situation you only select the first one in your GetMedia call.
Regarding the positioning of the output I suspect you have some css-magic going on - try removing you spans and divs to see if your output looks correct.
>Tommy
so something like this :
Hi Thanks Tommy, I have tried what you said but I get an XSLT error, I have the following code now, have I missed something somewhere?
It's ok I have realised my mistake, now have the following:
Glad I could help
is working on a reply...