I have some XSLT that succesfully gets all the child nodes for display as subnavigation. I want that exact list of child nodes to display in the subnav of all child pages. The first part of the code below works perfect, gives me the parent node on every page.
How do I get the second portion to work on child pages? Is there a way to force it to travel up the tree and always start at the same node, no matter what page and how deep the XSLT is being displayed from?
I think it should be possible if you use the same selector as the one you use in you first snippet.
Can you try changing your for-each from this:
<xsl:for-eachselect="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
to this:
<xsl:for-eachselect="$currentPage/ancestor-or-self::* [@template=1165 and string(umbracoNaviHide) != '1']/* [@isDoc and string(umbracoNaviHide) != '1']">
Thi s should get the child nodes from the node you selected in the first step instead of the child nodes from the current page. I haven't tested it though, but you can try giving it a shoot :)
Holy cow, that works! It's that second part that is the important part. I could not get it to basically begin one level down. Now, I just need to understand it for the next time.
Repeat results of select on all child pages
I have some XSLT that succesfully gets all the child nodes for display as subnavigation. I want that exact list of child nodes to display in the subnav of all child pages. The first part of the code below works perfect, gives me the parent node on every page.
How do I get the second portion to work on child pages? Is there a way to force it to travel up the tree and always start at the same node, no matter what page and how deep the XSLT is being displayed from?
Hi there Connie.
I think it should be possible if you use the same selector as the one you use in you first snippet.
Can you try changing your for-each from this:
to this:
Thi s should get the child nodes from the node you selected in the first step instead of the child nodes from the current page. I haven't tested it though, but you can try giving it a shoot :)
/Kim A
Holy cow, that works! It's that second part that is the important part. I could not get it to basically begin one level down. Now, I just need to understand it for the next time.
Thanks!
is working on a reply...