I started building my multingual website with one language node (en-US). For my 'featured solutions' property of datatype Multi Node Tree Picker, I chose a Start node ID under the en-US root node
A thing I didn't anticipate however, was that on another language node (he-IL), the Start node ID of my Multi Node Tree Picker needs to have another Start node ID, that is, the Solutions node under the he-IL root node.
I could of course create two MNTP properties on my document type, one for each language, and then in code check wich property has values and read out those values, but I wonder if there exists a more elegant solution.
yes, there's a more elegant solution, as you can xpath your mntp settings to make sure to only list 'solution' nodes for that specific language. Don't know the syntax by heart, but thought you could use $currentPage in your xpath and go from there.
MNTP and Multilingual websites
Hi,
I started building my multingual website with one language node (en-US). For my 'featured solutions' property of datatype Multi Node Tree Picker, I chose a Start node ID under the en-US root node
A thing I didn't anticipate however, was that on another language node (he-IL), the Start node ID of my Multi Node Tree Picker needs to have another Start node ID, that is, the Solutions node under the he-IL root node.
I could of course create two MNTP properties on my document type, one for each language, and then in code check wich property has values and read out those values, but I wonder if there exists a more elegant solution.
Thanks for your advice,
Anthony
yes, there's a more elegant solution, as you can xpath your mntp settings to make sure to only list 'solution' nodes for that specific language. Don't know the syntax by heart, but thought you could use $currentPage in your xpath and go from there.
Cheers,
/Dirk
Thanks Dirk,
I'm not an XPath expert, but I'll look for XPath examples, and try to solve it this way.
Thanks for the advice,
Anthony
Probably could find some inspiration in this thread... http://ucomponents.codeplex.com/discussions/288016
Thanks a lot Dirk,
the above reference solved it. It was as simple as writing this XPath query:
descendant::SolutionArea[@isDoc]
have a nice weekend,
Anthony
just to show(off) the proof that it worked :)
hope this might be useful to someone else developing a multilingual website.
greetings,
Anthony
is working on a reply...