Copied to clipboard

Flag this post as spam?

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


  • Murray Roke 503 posts 966 karma points c-trib
    Oct 24, 2013 @ 05:13
    Murray Roke
    0

    Multi node tree picker Xpath filter to prevent picking yourself

    Hi
    I'm trying to add an XPath filter to prevent the user picking the current node. I experimented with this:

    /*[@id=1345]
    

    Which works for that one case, but I need to substitute the hard coded ID for the current ID. So I tried this:

    /*[@id=$currentPage/@id]
    

    But I get XPath errors all over my node picker. Does anyone have any ideas how I can achieve my goal?

    Cheers. Murray.

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 24, 2013 @ 08:09
    Dennis Aaen
    0

    Hi Murray.

    The reason you get the error when using $currentPage is because you can't use the $currentPage in the Multi node tree picker as far as I know.

    DonĀ“t know if you have seen this documentation before, but here are some of the Xparth selections that you can do with the  Multi node tree picker.

    For $currentPage as I see it you have to use Xpath self::*

    http://our.umbraco.org/Documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors/Multi-Node-Tree-Picker

    Hope this helps,

    /Dennis

  • Murray Roke 503 posts 966 karma points c-trib
    Oct 30, 2013 @ 01:16
    Murray Roke
    0

    self::* refers to the node being evaluated to see if it should be included or excluded by the filter, it does not refer to the node we're editing.

    $currentPage does work in the "XPath expression" setting field, but it does not work in the "XPath filter" setting field.

    I've created an issue for it here: http://issues.umbraco.org/issue/U4-3275

Please Sign in or register to post replies

Write your reply to:

Draft