We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30982
    • 2 Posts
    Hello, I am very new to Modx and apologize if this question will offend some gurus smiley

    I’ve looked through the forum but could not find the way to create top menu, product menu and site links menus. (website ukkotubs.com)

    Also once menus are created is there a way to map different pages to different menus?

    Thank you very much for answers.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You will find our community to be one of the biggest advantages to MODx. We do not get offended (well, unless you’re deliberately trying to be offensive), and you’ll usually get the help you need within an hour or so.

      You can have multiple Wayfinder calls on the same page. It is very common to have a main menu, a "site utilities" menu (either at the very top of the page or in the footer) and a dynamic submenu in a sidebar.

      Keep in mind that not all menus need to be dynamic (using Wayfinder and needing to take up the time and resources to generate the menu). For example, the "site utilities" menu usually contains links to pages that won’t change, so an ordinary static HTML menu will do just fine, and save that few milliseconds processing time and database access.

      Product menus are usually more complex, requiring summary text, images, maybe pricing or other details. This is handled by Ditto, which can be used for any kind of flat listing (Wayfinder will do nested structures) taken from a single or multiple parents (use the &parents parameter), such as blog posts, news, or product catalogs. Ditto allows the inclusion of any number of TVs, as well as other fields, has filtering and sorting... well, it’s almost unlimited in how you can display your listing of documents.

      Also once menus are created is there a way to map different pages to different menus?
      I’m not sure what you mean here, perhaps you could re-phrase the question? Or give an example?

      Menus generated by Wayfinder or other page listing snippets will (generally) reflect the structure of your documents in the Document Tree in the left side of the Manager. You use the &startId parameter of the snippet call to specify which document in the Tree you want to use as the parent of the menu structure you want to build. A parent Id of 0 means to start with the very top-level documents. This is common for the main menu.

      You can also use another snippet (or a TV) for this value; the UltimateParent snippet is often used, since it travels up the tree structure from the page being generated to get the ID of its top-level ultimate parent (it can be configured to stop at whatever level you want) and returns that ID. This is used for displaying sub-menus; in some cases it is used in multiple language sites, where the top-level documents are used as containers for each language group.
        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
        • 30982
        • 2 Posts
        Thank you Susan for your reply.

        Basically what I am trying to achieve is to have links (which is dynamically created when I create say individual product pages) and links in the site category. Now the links in the site category do not have to be dynamic as you said they could be static. And then I have top menu where I would like to have blog, contact us, search, faq and other functions linked. I’ve created testing subdomain test.ukkotubs.com and managed to get pages from Modx default installation linked under the products category on the left (which I can change later). Now the question is how I go around with say static links to open html page on to main "content" (preserving site template)? And how to move blog and other functions on to the top? I am unfortunately not very good with php side of it and need more simple step by step type of instructions. Is there any where in the forum somebody already explained this maybe?

        Thanks
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The menu structure generated by a Wayfinder call will reflect the structure of your document tree. Take a look at the tree in the manager of my site (login info below). Normally, one would have the "home" page, the "blog" page, etc on the top level, and Wayfinder would generate the menu based on that top level.

          Dropdowns, javascript or CSS, are optional; there are lots of tutorials and examples of how to use Wayfinder at http://www.muddydogpaws.com/development/wayfinder/features.html

          To get the most out of it, go to its wiki page and download the documentation from the link in the beginning.
            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