How would I output a list of all nodes at the current level for the current parent?
e.g. I have a website with three layers of navigation. When inside a level 3 page, I want to show the names of all other level 3 pages for that particular level 2 node.
Can anyone show me how to do this? (I really need to learn XSLT quickly - I'm completely stuck at the moment without it!)
Basically, you're selecting all nodes ('/node' selector) after having applied the '/..' selector (selecting parent node) on the $currentPage (node currently being requested)
Same snippet can be used to list all level 2 pages residing under the same parent node at level 1
Does that make more sense now? Also, have a look at this wiki article (a good overview of available xpath and xpath axes)
List all nodes of parent at current level
Hi,
How would I output a list of all nodes at the current level for the current parent?
e.g. I have a website with three layers of navigation. When inside a level 3 page, I want to show the names of all other level 3 pages for that particular level 2 node.
Can anyone show me how to do this? (I really need to learn XSLT quickly - I'm completely stuck at the moment without it!)
Thanks
Hi Dan,
you should try this:
Basically, you're selecting all nodes ('/node' selector) after having applied the '/..' selector (selecting parent node) on the $currentPage (node currently being requested)
Same snippet can be used to list all level 2 pages residing under the same parent node at level 1
Does that make more sense now? Also, have a look at this wiki article (a good overview of available xpath and xpath axes)
Cheers,
/Dirk
Perfect, thanks!
is working on a reply...