We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44200
    • 33 Posts
    Hi all,

    I install Babel with to languages (German and English). I want for both sides only one template. How do I managed the different ID of the Resources in Wayfinder? Example: In the German Version HOME has the ID 1 and in the English Version the ID 2.

    Sorry, I hope my English isn't too bad.

    Thanks,
    Michael
      • 38290
      • 712 Posts
      Are your languages separate contexts?
        jpdevries
        • 44200
        • 33 Posts
        Yes, two separate contexts.

        Quote from: dinocorn at Nov 07, 2013, 02:11 PM
        Are your languages separate contexts?
          • 38290
          • 712 Posts
          Quote from: mibolu at Nov 07, 2013, 03:59 PM
          Yes, two separate contexts.

          Quote from: dinocorn at Nov 07, 2013, 02:11 PM
          Are your languages separate contexts?

          Create context settings in your two contexts. Something like about_page_id and set it to the id you want for that context. Then, pass those into your Wayfinder call.
            jpdevries
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Wouldn't that be site_start?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 38290
              • 712 Posts
              Quote from: sottwell at Nov 08, 2013, 01:00 AM
              Wouldn't that be site_start?

              Well I think the goal is to create links to resources not just the homepage for the given context, but ya to home pages absolutely.

              I just learned this today but you can use URI instead of ID if you wish. Could prevent needing a context setting at all.
              https://twitter.com/drumshaman/status/398522674609016832
                jpdevries
                • 36818
                • 119 Posts
                Hi mibolu,

                Use the wayfinder as this
                [[!Wayfinder? &startId=`[[BabelTranslation? &resourceId=`"ID of the parent you want to start` &contextKey=`[[*context_key]]`]]` ]]


                And in the context settings you have to put some values as you can see in the attachement.

                And don't forget to create a gateway-plugin. Details here:
                http://www.multilingual-modx.com/blog/2011/multilingual-websites-with-modx-and-babel.html

                Hope this helps.
                Fabian
                  • 44200
                  • 33 Posts
                  Hi, thank you all a lot.

                  I will try your solutions and hope I bring it to work.
                  I'm a beginner with MODx, but there are a lot of great tutorials
                  in the Web!!

                  Best regards,
                  Michael