Using the Multinode Tree Picker in a multilingual setting
We have built a one-to-one multilingual site. That is, there is an EN root folder and a GR sibling:
- En
- Gr
A document type includes a tree picker property (e.g. Speakers). The picker data type requires that we define the content root. However, I have two roots, one for each language.
As a result, I am forced to only select content from one language.
Vorto package, provides a language menu in the content editor. However, it does not seem to affect the above behavior.
Have you ever had to handle this case? If so how would you suggest that we go around it?
You need to use an XPath query in your MNTP rather than picking a content page. So in the data type click "Query for Root Node" and then add an XPath query there. Without knowing your tree structure and doctype aliases it's hard to help with the query, but the MNTP does provide helper.
Example: I have an installation with multiple blogs in multiple sites. Each blog can contain many Blog Posts. I have an MNTP picker on a Blog Post that allows an editor to select related Blog Posts from the current Blog. So the XPath for this is:
$current/ancestor-or-self::Blog
Allow items of type: BlogPost
The query basically goes back up the tree from the current node to find the root Blog node of the site and then allows only BlogPost nodes to be selected from within it.
Using the Multinode Tree Picker in a multilingual setting
We have built a one-to-one multilingual site. That is, there is an EN root folder and a GR sibling:
A document type includes a tree picker property (e.g. Speakers). The picker data type requires that we define the content root. However, I have two roots, one for each language.
As a result, I am forced to only select content from one language.
Vorto package, provides a language menu in the content editor. However, it does not seem to affect the above behavior.
Have you ever had to handle this case? If so how would you suggest that we go around it?
You need to use an XPath query in your MNTP rather than picking a content page. So in the data type click "Query for Root Node" and then add an XPath query there. Without knowing your tree structure and doctype aliases it's hard to help with the query, but the MNTP does provide helper.
Example: I have an installation with multiple blogs in multiple sites. Each blog can contain many Blog Posts. I have an MNTP picker on a Blog Post that allows an editor to select related Blog Posts from the current Blog. So the XPath for this is:
Allow items of type:
BlogPost
The query basically goes back up the tree from the current node to find the root Blog node of the site and then allows only BlogPost nodes to be selected from within it.
Well, that was something I had not noticed.
I tend to display xpath blindness.
Thank you.
is working on a reply...