we created a multi-language project in Umbraco 4.9. For every language section, the homepage should have different navigation sections and items. For this purpose we created a DataType we called Multilist and it is based on the Multi-Node Tree Picker. It displays all nodes starting from the language-root.
This is how the selection looks
EN-US About Catalogue Item 1 Item 2 FAQ
All looks fine, and everything is nicely selectable, except for the EN-US node.
The xpath expression used is
$currentPage/ancestor-or-self::*[1]
I tried several options, but they all create the same problem. Every single node can be picked (regardless of the level ) except for the root.
If this list is displayed, 'Catalogue' cannot be picked, all the others can.
(If your EN-US node is not at level 1, change the number accordingly)
Using $parentPage makes it possible for the picker to work even on a non-published page (e.g. if you've just created the page and haven't saved it yet).
Selection problem in Multi-Node Tree Picker
Hi all,
we created a multi-language project in Umbraco 4.9. For every language section, the homepage should have different navigation sections and items. For this purpose we created a DataType we called Multilist and it is based on the Multi-Node Tree Picker. It displays all nodes starting from the language-root.
This is how the selection looks
All looks fine, and everything is nicely selectable, except for the EN-US node.
The xpath expression used is
I tried several options, but they all create the same problem. Every single node can be picked (regardless of the level ) except for the root.
If this list is displayed, 'Catalogue' cannot be picked, all the others can.
What are we doing wrong?
regards
Benoit
Hi Benoit,
Are you using the XPath in enable mode to allow nodes?
The XPath you've supplied will select only the first ancestor (i.e. the parent) of $currentPage.
If you want to be able to select any node in the current node's language tree, try this:
(If your EN-US node is not at level 1, change the number accordingly)
Using $parentPage makes it possible for the picker to work even on a non-published page (e.g. if you've just created the page and haven't saved it yet).
/Chriztian
Hello Chriztian,
switching between enable and disable mode for XPath did not change anything. So i left it in disable mode.
Changed the xpath statement to your suggestion though. Thx for that.
Still cannot select the top node in my tree.
regards
Benoit
Hi again,
I updated the XPath to use descendant-or-self:: instead of the descendant:: shortcut (//)
If you're using this XPath the filter should be set to enable for you to be able to actually select the nodes.
Hope it helps,
/Chriztian
is working on a reply...