We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24248
    • 5 Posts
    Hey guys, I am having a heck of a time trying to figure out how to create a basic menu. I have searched the forums, checked the help docs and the wikis and I still can’t really grasp how it works. I have downloaded and installed wayfinder aswell.

    My question basically is can someone point me to some very direct step by step documentation on creating a basic menu? Also how I would reference it in the html etc. Thanks very much
    • Start by studying the demo content that is an option with installer. After that, it depends entirely on what your definition of "basic". Do you have an HTML site template you’re trying to reproduce?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 24248
        • 5 Posts
        hey, thanks for the response. I have already transfered my xhtml mockup into modx and populated the main content section where I want it, but certain other aspects such as modules and specific menus elude me. I do not believe I opted for the optional content, can I put i repopulate it without having to reinstall modx? If not, any other resources?

        What I mean by basic menu is just how you create a navigation menu that leads to static pages etc.
        • To create menu items for static (not MODx documents) pages, use Weblinks. They are a special kind of document that only has a URL. See my article here if you are curious.
            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
            • 24248
            • 5 Posts
            I figured weblinks were the way to go, however how do i create a seperate list. And what do you mean for non modx documents? Say i create a bunch of static pages: about, training, yada, blah, etc - then i want that list of links to be grouped together perhaps seperate from the primary links how do i group the weblinks together into a snippet or something that I can just throw into a section of my xhtml document? For instance for the wayfinder links to show up in have the [wayfinder blah blah] where I want the wayfinder links to show up, which I still don’t even understand how that works either.
            • By "static" pages, do you mean not MODx documents, but html files somewhere on your server?

              Organize your documents (weblinks or otherwise) into groups under a parent document. Then use that parent document’s ID as the startId for a Wayfinder call. That is what the structure of the Document Tree represents.

              So create a document (it can be unpublished) called "external". Now put all your weblinks under that document. Use its ID as the startID for Wayfinder. Since the parent document is unpublished, it will never show, but the menu to all your external pages under it will be generated.

                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
                • 24248
                • 5 Posts
                I mean’t static pages within modx, create from within modx. So wherever I want a list of links to be I just put the ID at the end of the wayfinder tag in my html document? I’ll give this shot later, thanks
                • Ok, just a bit of advice on getting help, the correct terminology is not "static" pages. Static pages are ipso facto not dynamic pages. Any pages generated by a CMS cannot, by definition, be static pages, since they are dynamically generated by the CMS. Miscommunications like this can cause a lot of confusion.

                  As far as creating menus go, just organize your documents in the Tree as you wish; if any documents need to be in more than one place, use weblinks. The Tree is a reflection of how menus will be generated. Actually, that’s its only purpose. All documents go in the database in the same way, they just have a "parent" field to indicate what document their parent is (or 0 if they are in the site root), and a "is_parent" field to indicate if they have any documents as children. The only purpose this serves is to organize the menus that the menu snippets generate. It makes no difference whatsoever in the final display of the documents themselves.

                  Using the startId argument, you can have the Wayfinder snippet generate any "branch" of the main Tree structure you like. Using a startId of 0 will generate the entire tree. Of course, there are a number of other options to control exactly which documents and how the menu is generated, but that’s the general idea.
                    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
                    • 24248
                    • 5 Posts
                    Thanks again for your help, for the most part I undestand how it works now. I made a new document, published weblinks under it and put the correct ID in wayfinder and it came up, so now its time to play a bit more, appreciate the help.

                    Not for nothing but the documentation doesn’t seem all that clear for the simpliest of tasks.
                      • 27376
                      • 576 Posts
                      Quote from: qwik3r at Apr 19, 2007, 03:15 PM

                      Not for nothing but the documentation doesn’t seem all that clear for the simpliest of tasks.
                      Much like the rest of the MODx project, documentation is still under construction.