We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27437
    • 49 Posts
    Hi. i’m experimenting with modx. I want to make a multilanguage site. So i did the tutorial here http://modxcms.com/forums/index.php/topic,29597

    This is the lay-out i want to make.

    +--------------------------------------------+
    | home | contact (2) (1) NL | DE | EN |
    +--------------------------------------------+
    | welcome | |
    | (3) | content |
    | | |
    +--------------------------------------------+

    1: static
    2: static, but depends on language
    3: static, but depends on language

    I searched here and google, but i cant figure it out and i’ve seen more people searching for a neat way to do this in wayfinder.

    So somehow i need 3 wayfinders. The first one is easy

    --> wayfinder? &startId=0 &level=1

    2nd

    --> Wayfinder? &startId=[+LanguageID+] &level=1

    [+LanguageID+] = set to the ID when you click on the language

    3th is hard and i need some help with it. it could be something like this.

    --> [!Wayfinder?&startId=`[!UltimateParent?&id=`[*id*]`&top=`[+LanguageID+]`!] &level=1!]

    but this doesnt work the way i want it..
    also because the double exclamation marks shouldnt work.

    pls help





      • 10449
      • 956 Posts
      you have to alternate cached and uncached snippet syntax:

      either
      [[snippet? &parameter=`[!anotherSnippet!]`]]
      or
      [!snippet? &parameter=`[[anotherSnippet]]`!]

      Hence, try
      [!Wayfinder?&startId=`[[UltimateParent?&id=`[*id*]`&top=`[+LanguageID+]`]] &level=1!]
        • 27437
        • 49 Posts
        Hi thanks,

        I allready tried that. That doesn’t work because in this case

        [!UltimateParent?&id=`[*id*]`&top=`[+LanguageID+]`!]

        gives the correct ID

        and

        [[UltimateParent?&id=`[*id*]`&top=`[+LanguageID+]`]]

        doesnt..

        I also put the [!UltimateParent?&id=`[*id*]`&top=`[+LanguageID+]`!] code in a snippet, but that also doesnt work. Maybe because i still cant call the snippet uncached.

          • 10449
          • 956 Posts
          If you just need a 1 level navigation for (3) you could also use Ditto.

          [+LanguageID+] = set to the ID when you click on the language
          But what exactly is LanguageID? A placeholder? If so, where is that defined? Or is it a TV? In that case you should rather use [*LanguageID*] instead of [+LanguageID+]. If you know that number already, you don’t even need placeholder syntax.
            • 27437
            • 49 Posts
            appreciate your help... I’m quite new to ModX and i find it very interesting and flexible. But i’m still learning...

            the [+LanguageId+]

            comes with the tutorial. It’s set in the language snippet.

            In my case it can be three Id’s because i have three languages.

            the problem is if you ask me with the ultimate parent. It needs to be uncached...

            I have been thinking and maybe it would help to implement the ultimate parent into the wayfinder code, but thats still to hard for me to fix..

            Or is [* languageid *] the key? I dont know how to change [+ into [*

            Just make a tv i understand.. But it would be nice if all is dynamic.

              • 27437
              • 49 Posts
              got it to work.. modified wayfinder...