Gives me an XML result and I can loop that out in another XSLT file to show the images.. but for the life of me I can't get the sibling links to be shown .. have spent about 4 hours trying different variations to following-sibling / preceding-sibling syntax to get nothing. The code below looks to me like it should work but I get nothing other then the current folder name displayed.
The reason you can't access the siblings is that they're not present in the XML you get from GetMedia() - you only get the folder you ask for with its descendants.
I did think about going via the parent node .. but I kind of figured the sibling functions would basically do that sort of step for me, and I couldn't see any references anywhere that confilected with what I was trying to do.
The other reason is that generally multiple templates do my head in more then just general XSLT. For example I copied and pasted (yep lazy gettign you to do all my work) your code above and it gives this error.
"Expected end of the expression, found '='.@nodeTypeAlias -->=<-- 'Folder' "
and I'm not sure what that means. as the line I think it reffrers to looks syntaticaly correct to my eyes.
Regarding "multiple templates" in XSLT - I did a presentation on this at Codegarden '10 called "XSLT beyond <for-each>", which demonstrates how that works ... should be able to find it on stream.umbraco.org
Prceeding - Following Siblings from Media Library ID
I'm passing an Media folder ID via a Query string and want to print out a list of the sibling folders with links for a menu.
I can see that thecode
Gives me an XML result and I can loop that out in another XSLT file to show the images.. but for the life of me I can't get the sibling links to be shown .. have spent about 4 hours trying different variations to following-sibling / preceding-sibling syntax to get nothing. The code below looks to me like it should work but I get nothing other then the current folder name displayed.
Hi Jamie,
The reason you can't access the siblings is that they're not present in the XML you get from GetMedia() - you only get the folder you ask for with its descendants.
You need to grab the parent folder instead, e.g.:
/Chriztian
Thanks Chriztian,
I did think about going via the parent node .. but I kind of figured the sibling functions would basically do that sort of step for me, and I couldn't see any references anywhere that confilected with what I was trying to do.
The other reason is that generally multiple templates do my head in more then just general XSLT.
For example I copied and pasted (yep lazy gettign you to do all my work) your code above and it gives this error.
"Expected end of the expression, found '='. @nodeTypeAlias -->=<-- 'Folder' "
and I'm not sure what that means. as the line I think it reffrers to looks syntaticaly correct to my eyes.
Jamie
Hi Jamie,
Arg, sorry about that - bad error on my part. It should read like this:
Regarding "multiple templates" in XSLT - I did a presentation on this at Codegarden '10 called "XSLT beyond <for-each>", which demonstrates how that works ... should be able to find it on stream.umbraco.org
/Chriztian
is working on a reply...