Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Nov 17, 2012 @ 08:21
    Anthony Candaele
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 17, 2012 @ 09:48
    Dirk De Grave
    1

    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

  • Anthony Candaele 1197 posts 2049 karma points
    Nov 17, 2012 @ 10:03
    Anthony Candaele
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 17, 2012 @ 10:06
    Dirk De Grave
    2

    Probably could find some inspiration in this thread... http://ucomponents.codeplex.com/discussions/288016

     

  • Anthony Candaele 1197 posts 2049 karma points
    Nov 17, 2012 @ 10:19
    Anthony Candaele
    0

    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

  • Anthony Candaele 1197 posts 2049 karma points
    Nov 17, 2012 @ 10:25
    Anthony Candaele
    1

    just to show(off) the proof that it worked :)

     

    hope this might be useful to someone else developing a multilingual website.

    greetings,

    Anthony

Please Sign in or register to post replies

Write your reply to:

Draft