Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nikolas van Etten 202 posts 162 karma points
    Jan 20, 2011 @ 20:39
    Nikolas van Etten
    0

    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?

    $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.

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jan 20, 2011 @ 20:46
    Kim Andersen
    2

    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

  • Nikolas van Etten 202 posts 162 karma points
    Jan 20, 2011 @ 21:21
    Nikolas van Etten
    0

    Seems to be working well!


    Thanks! ;)

  • Kim Andersen 1447 posts 2196 karma points MVP
    Jan 20, 2011 @ 22:27
    Kim Andersen
    0

    You are welcome Nikolas. Great to hear that the code worked for you :)

    /Kim A

Please Sign in or register to post replies

Write your reply to:

Draft