Help converting 4.0 left-navigation xslt to 4.5 schema
Hello,
Been banging my head on the wall and thought I'd see if anyone could provide a little hand-holding. I've gotten it to partially work, but only two levels deep. I'm sure I'm missing something simple, but I'm still learning XSLT, so the solution is evading me.
The code above basically finds the parent for this section outputs that parent node as the first item in the list and then calls a template which loops through the descendants of each node.
Guess there's a test that'll fail in the new schema
<xsl:iftest="count(./node [string(./data [@alias='umbracoNaviHide']) != '1' and not(self::newsItem) and not(self::newsListing) and @level <= $maxLevelForNav]) > 0">
still using the old syntax for checking the property umbracoNaviHide, should be
<xsl:iftest="count(./node [string(./umbracoNaviHide) != '1' and not(self::newsItem) and not(self::newsListing) and @level <= $maxLevelForNav]) > 0">
Thanks for the comments, all. Had to make one change in addition to Dirk's change above, but all is good now!
<xsl:iftest="count(./*[@isDoc] [string(./umbracoNaviHide) != '1' and not(self::newsItem) and not(self::newsListing) and @level <= $maxLevelForNav]) > 0">
Help converting 4.0 left-navigation xslt to 4.5 schema
Hello,
Been banging my head on the wall and thought I'd see if anyone could provide a little hand-holding. I've gotten it to partially work, but only two levels deep. I'm sure I'm missing something simple, but I'm still learning XSLT, so the solution is evading me.
Here's the working 4.0 XSLT:
And here's what I have so far for 4.5:
Hey Matt,
When I create left navigation I tend to find the root node for section and then traverse from that with nested template calls:
The code above basically finds the parent for this section outputs that parent node as the first item in the list and then calls a template which loops through the descendants of each node.
I hope this helps
L
Guess there's a test that'll fail in the new schema
still using the old syntax for checking the property umbracoNaviHide, should be
Hope this helps.
Regards,
/Dirk
Thanks for the comments, all. Had to make one change in addition to Dirk's change above, but all is good now!
is working on a reply...