Copied to clipboard

Flag this post as spam?

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


  • manwood 87 posts 109 karma points
    Mar 07, 2010 @ 17:14
    manwood
    0

    How do you select nodes that aren't on a pages ancestor list?

    I have a tree that looks like

    - Content

        - Contentpages

        - Types

            - ListofTypes

     

    I want to get the list of types from within a content page, so i need to navigate up the content tree and back down the Types branch, or start from the very root of Umbraco - any ideas?

    Thanks

  • Tommy Poulsen 514 posts 708 karma points
    Mar 07, 2010 @ 17:27
    Tommy Poulsen
    0

    Check out xpath.

     

    You navigate up by using "..", e.g. parent of currentpage is "$currentPage/.." and concat further navigation like "$currentPage/../node [@nodeTypeAlias='Types'] etc.

    You can refer to the root in pultiple ways, e.g. "

    $currentPage/ancestor-or-self::root
Please Sign in or register to post replies

Write your reply to:

Draft