We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36991
    • 3 Posts
    This is my first post, and I'm very new to MODx. I've managed to put together a template, but am missing something when it comes to populating a menu. I know I could easily do this using chunks, or snippets, but I'm trying to build this thing around a template that will be usable by others who have very little html, php, css knowledge. Right now I'm using
    [[!Wayfinder? &startId=`0` &level=`1`]]
    inside a menu div, and it's unclear to me how this is supossed to work since I can't get it to do anything. I've created the initial home page, and a test page so far.
      • 32316
      • 387 Posts
      From the Official docs (available here http://rtfm.modx.com/display/ADDON/Wayfinder):
      Wayfinder is a Snippet by kylej that scans a specified portion of the MODx document tree, finds all documents that satisfy a certain criteria (determined by the Parameters), and outputs a formatted list of those documents.

      To put it another way it scans the list you see on the left side of the manager screen under the resource tab and makes a menu (well really a list) from the resources it finds there that match parameters you give wayfinder.

      With your call it should find all the first level resources under the web context ...
      So:
      you need to have some resources
      the resource needs to use a template with the wayfinder call in it OR have the call in its content
      the resources need to be published to show up
      the resources need to not have the 'hide from menu' box checked

      This will produce a list of links - it is up to you to make the list look like a menu (using css)
        • 36991
        • 3 Posts
        Thanks, Whistlemaker. I have two pages (those are resources, right?) published. The wayfinder call is in the template I setup for it. I'm assuming this outputs an unordered list. Correct me if I'm wrong. The hide from menu boxes are unmarked. It seems I have everything covered in your checklist. I must be missing something very simple. Do I need to assign an id to each page? [ed. note: daymon74 last edited this post 15 years, 1 month ago.]
          • 36991
          • 3 Posts
          Ok, I just looked at the link you posted, and think I can figure it out from there. I'll try anyway. Thanks for the help!
            • 32316
            • 387 Posts
            yes (sort of) pages are resources - but resources don't have to pages, if you look under the page setting tab for a resource, the class key can be one of four types (one of which is a document - otherwise known as a page)

            yes, wayfinder creates unordered lists

            the id is assigned automatically

            I'm sure when you figure out what is wrong it will seem obvious!
              • 3749
              • 24,544 Posts
              Make sure the pages are published.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting