I've created a global navigation XSLT-file which has been used pretty much all over, but I haven't gotten around to upgrade it to the new schema due to less time to play around with Umbraco.
Anyone able to help out on how to rewrite the following?
$currentPage/ancestor-or-self::node [@level=$startLevel]/node [string(./data [@alias='umbracoNaviHide']) != '1' and @level <= $stopLevel and not(contains($excludedNodeTypeAliases, concat(@nodeTypeAlias,',')))]
The need for this function is so that I can define a comma separated list of doc types I want to exclude from all navigation and this may be different from one site to another.
$currentPage/ancestor-or-self::*[@level=$startLevel]/*[string(umbracoNaviHide) != '1' and @level <= $stopLevel and not(contains($excludedNodeTypeAliases, concat(name(),',')))]
I haven't tested this, but could you give it a try and report back on how it's working out.
Rewrite of node type filter for new schema
I've created a global navigation XSLT-file which has been used pretty much all over, but I haven't gotten around to upgrade it to the new schema due to less time to play around with Umbraco.
Anyone able to help out on how to rewrite the following?
The need for this function is so that I can define a comma separated list of doc types I want to exclude from all navigation and this may be different from one site to another.
Hi Nikolas.
I'll give it a shot:
$currentPage/ancestor-or-self::*[@level=$startLevel]/*[string(umbracoNaviHide) != '1' and @level <= $stopLevel and not(contains($excludedNodeTypeAliases, concat(name(),',')))]
I haven't tested this, but could you give it a try and report back on how it's working out.
/Kim A
Seems to be working well!
Thanks! ;)
You are welcome Nikolas. Great to hear that the code worked for you :)
/Kim A
is working on a reply...