We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14797
    • 9 Posts
    Evening All,

    Still getting to grips with Modx...

    Wondered if anyone could please spare me some time and explain briefly how exactly I use the information on (http://www.muddydogpaws.com/development/wayfinder/examples/example-7.html) to create my dropdown menu.

    Anything you need to know about my set up then please ask.

    Thank you smiley
      • 15001
      • 697 Posts
      Hi Josh,

      The first thing you should do is downloading Wayfinder documentation. It’s available as a zip file from the Wiki.
      It will help you a lot that a Wayfinder menu uses a system of boxes.

      In general, the boxes are of the <ul>...</ul> type with <li>...</li> elements for each item.
      Of course <ul>...</ul> boxes can be put inside <li> elements.
      This way, you create the 2nd, 3rd, 4th level of your menus. No limit !
      (But your CSS stylesheet for the menu can become quite complex !)

      The model for the most outer box is defined in the chunk pointed by the outerTpl parameter.
      Other inner boxes are described by innerTpl. (Wayfinder documentation explains this better.

      What you must understand is that there are default chunks (with placeholders) that Wayfinder uses for its default output. What you can do is overwrite the default behavior by setting your own chunks.

      What I advise you to do is using &configTpl. This way, you specify all your menu settings in a configuration file.
      This is a lot easier to read than having to open and edit several chunks in MODx backend.

      Normally, you put all the graphical settings in a CSS stylesheet. Call it with &cssTpl.
      In the CSS sheet, define the appearance of the menu entries depending on how deep there are in the hierarchy.
      A major difficulty is to find the way to make the CSS styling compatible with all browsers.
      For example, on http://www.cssplay.co.uk/ are many beautiful menu examples, but I observed the stylesheets were different if I used MSIE or Firefox.

      It took me a while to master Wayfinder, so be patient.
      I can provide some consulting if you don’t have time enough.

      With Wayfinder, you can really do all what you want : drop menus, accordion menus, tree menus, a.s.o.
      Have fun !
        • 14797
        • 9 Posts
        Hi,

        Thanks for your response.

        My next question is where do I create the "&parentRowTpl" and "&cssTpl" chunks?

        At present I am just using "[!Wayfinder?startId=`0` &hereClass=`current` &level=`1` &outerClass=`main-nav`!]" in my template which gives me an output as you can see at the website http://www.margateyachtclub.org

        Regards,
        Josh
          • 16183
          • 1,390 Posts
          Quote from: josh_myc at Jul 27, 2009, 05:19 PM

          Hi,

          Thanks for your response.

          My next question is where do I create the "&parentRowTpl" and "&cssTpl" chunks?


          You create those as chunks..i.e. tpl chunks. You might find the Wayfinder ebook in my signature useful...

          cheers/k
            • 15001
            • 697 Posts
            My next question is where do I create the "&parentRowTpl" and "&cssTpl" chunks?

            Yes, these are chunks. But you can avoid to create chunks in MODx. (And I advise this strongly !)

            You can directly define the content of the chunks in some PHP file pointed by "&configTpl".
            If I remember, there are some examples of this technique coming with MODx installation.