We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42254
    • 6 Posts
    I have my site coded 12 pages 6 in English 6 in Spanish. I have 2 different menus, each menu has 7 items - 6 in their language and a link to the other language. I have set up basic wayfinder and the css is working fine as is the active page highlighted. How do I use wayfinder to to show only the 7 pages required for each menu? To be clear I would want Spanish pages to show


    • eng
    • home
    • about
    • contact
    • links
    • location
    • gallery

    and the english to only show

    • span
    • home2
    • about2
    • contact2
    • links2
    • location2
    • gallery2

    I am a little overwhelmed by the documentation I have read so far and cannot see how to use wayfinder to do this. I am not looking for a language specific solution but a better understanding of how I can restrict menus to chosen pages depending on content.

    Can anyone explain how I would do this?

    This question has been answered by sottwell. See the first response.

    [ed. note: tranquil last edited this post 13 years, 9 months ago.]
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you are going to manage your languages with resource tree structure, you might be interested in this https://forums.modx.com/index.php/topic,29597.msg179898.html#msg179898
        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
        • 42254
        • 6 Posts
        Quote from: sottwell at Dec 06, 2012, 11:55 AM
        If you are going to manage your languages with resource tree structure, you might be interested in this https://forums.modx.com/index.php/topic,29597.msg179898.html#msg179898

        Thanks, but that was one of the pages that overwhelmed me. Maybe in future I will look at options such as that but at the moment I am trying to understand the basics and how wayfinder menus work. As I said in the original question this is not a language specific issue - the site and menu(s) are already coded. I just want to know if there is a simple way to implement them using wayfinder rather than through the page templates as they are currently.
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Basically, at its simplest, you need to have two "parent" resources in the root level, one for each language, then you use UltimateParent as the startID for your Wayfinder snippet. This will keep the menu structure limited to the branch of the resource tree for the current language.

          All the rest of the stuff is just to establish which language has been selected under different circumstances.
            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
            • 42254
            • 6 Posts
            Quote from: sottwell at Dec 06, 2012, 12:12 PM
            Basically, at its simplest, you need to have two "parent" resources in the root level, one for each language, then you use UltimateParent as the startID for your Wayfinder snippet. This will keep the menu structure limited to the branch of the resource tree for the current language.

            All the rest of the stuff is just to establish which language has been selected under different circumstances.
            Sounds exactly what I need but forgive my ignorance how do I create two parent resources? I currently have all pages in what appears to be a folder called web (the hover state tells me it is the 'default front-end context for your web site'. as you will realise I am a complete modx novice and the terminology is proving harder to master than the CMS itself.
            • discuss.answer
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              That is the context. Don't worry about it for now.

              Create a resource "English". Put all of the English pages under it.

              Create a second resource "Spanish". Put all of the Spanish pages under it.

              A very simple Wayfinder snippet would look like this:
              [[Wayfinder? &startId=`[[UltimateParent]]`]]


              The UltimateParent snippet works up the tree to find the topmost level parent of the page that was requested. So if your "English" page was #1, then Wayfinder would make a menu out of all of the resources under resource #1 - all of the English pages.


                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
                • 42254
                • 6 Posts
                Thanks for being patient and very clear I think I have enough to get going with what I want to do now.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Great. You will find it has limitations, and that is when the wiki or the forum topic will come in handy for adding more features.
                    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
                    • 22427
                    • 793 Posts
                    For more details you might find the Wayfinder Demo helpful.