We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26911
    • 4 Posts
    I see that wayfinder creates a nice general ul type navigation. but what if i want to customize how a menu is built. For example what if i wanted something like this:

    <ul id="cssdropdown">
    <li class="headlink"><a href="#">ABOUT US</a>
    <div id="megaMenuContainer">

    <div id="about-a">
    <p class="columncontent"><b>About Column 1</b></p>
    <ul>
    <li><a href="1">1</a></li>
    <li><a href="2">2</a></li>
    <li><a href="3">3</a></li>
    <li><a href="4">4</a></li>
    <li><a href="5">5</a></li>
    </ul>
    </div>

    <div id="about-b">
    <p class="columncontent"><b>About Column 2</b></p>
    <ul>
    <li><a href="1">1</a></li>
    <li><a href="2">2</a></li>
    <li><a href="3">3</a></li>
    <li><a href="4">4</a></li>
    <li><a href="5">5</a></li>
    </ul>
    </div>

    <div id="about-c">
    <p class="columncontent"><b>About Column 3</b></p>
    <ul>
    <li><a href="1">1</a></li>
    <li><a href="2">2</a></li>
    <li><a href="3">3</a></li>
    <li><a href="4">4</a></li>
    <li><a href="5">5</a></li>
    </ul>
    </div>

    </div>
    </li></ul>
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Each part of the menu can be given a custom tpl (we call them "tpls" to differentiate them from the main site’s templates), so it can take any form you can imagine. This will help; the tags are Evo but the same will work with Revo tags.

      http://modxcms.com/forums/index.php/topic,34176.msg207851.html#msg207851
        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
        • 26911
        • 4 Posts
        OK, so i am playing with the wayfinder and following a tutorial in the almost complete guide to constructing menus in modx with wayfinder and could get the menu to display. The basic call worked fine [[Wayfinder? &startId=`0`]] but the one in the tutorial doesnt product a menu [[Wayfinder? &startId=`0` &outerTpl=`menuContainer` &outerClass=`navigation`]] it just produces [+wf.wrapper+] which is whats in my chunk? what did i do wrong here. See here: http://modx.k-e-w-l.ca/
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Are you on Revo? As I mentioned, the tags are different: [[+wf.wrapper]] instead of [+wf.wrapper+]
            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
            • 26911
            • 4 Posts
            that fixed it... THANK YOU! Ill probably have more dumb q’s as i go
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Here is a good list of the differences in the tags; it may come in handy as a number of documents for Evo also apply to Revo with the tag difference.

              http://rtfm.modx.com/display/revolution20/Tag+Syntax
                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
                • 26911
                • 4 Posts
                So if i wanted to produce this:

                <ul id="cssdropdown">

                <li class="headlink">

                <a href="http://google.com/">Search Engines</a>

                <ul>
                <li><a href="http://google.com/">Google</a></li>
                <li><a href="http://yahoo.com/">Yahoo</a></li>
                <li><a href="http://live.com/">Live Search</a></li>
                </ul>

                </li>
                <li class="headlink">
                <a href="http://shopping.com">Shopping</a>

                <ul>
                <li><a href="http://amazon.com/">Amazon</a></li>
                <li><a href="http://ebay.com/">eBay</a></li>
                <li><a href="http://craigslist.com/">CraigsList</a></li>

                </ul>
                </li>

                </ul>


                whats my chunk and call?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  You don’t even need tpl chunks for that. There are plenty of classname options you can use to get those classes in place. You only need to specify these two classes; they will be applied to the appropriate default tpl.

                  &outerClass
                  default: NULL
                  values: name of class
                  description: The outerClass will be applied to the outerTpl container.
                  &innerClass
                  default: NULL
                  values: name of class
                  description: The innerClass will be applied to the container used in the innerTpl
                  [Edit] Ah, I see you want a id in the outer container, not a class. Then it’s best to simply copy the default, and after making sure it all works, edit the chunk as desired, testing after each change to make sure nothing is broken. Your outerTpl looks like this:
                  <ul id="cssdropdown"[+wf.classes+]> 
                  [+wf.wrapper+] 
                  </ul>
                  

                    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