Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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.
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
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.
self::*
$currentPage does work in the "XPath expression" setting field, but it does not work in the "XPath filter" setting field.
$currentPage
I've created an issue for it here: http://issues.umbraco.org/issue/U4-3275
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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:
Which works for that one case, but I need to substitute the hard coded ID for the current ID. So I tried this:
But I get XPath errors all over my node picker. Does anyone have any ideas how I can achieve my goal?
Cheers. Murray.
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
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
is working on a reply...