We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16466
    • 6 Posts
    I’m trying to create a custom template for MODx and I’m running into a snag on the menu creation. (Kudos to MODx for having, so far, the most logical templating system I’ve seen yet on a CMS - great to pick up!)

    I’m trying to use Wayfinder to create the menu in a simple, easy to modify by CSS way: nested DIVs. However, every time I think I vanquish all of the cursed UL tags, another one pops up. Here’s my code for it (I know it’s ugly and simplistic, but right now all I care about is using DIV and not UL - then I’ll worry about active pages, etc.):
    [tt][[Wayfinder? &startId=`0` &level=`2` &outerTpl=`wfOuter` &innerTpl=`wfParentRow` &parentRowHereTpl=`wfParentRow` &parentRowTpl=`wfParentRow` &activeParentRowTpl=`wfParentRow`&hereTpl=`wfParentRow`]][/tt]

    Even though I have so many options set, my latest menu addition still defaults to a UL tag... As other posters have mentioned, Wayfinder is great but could use much better documentation. All to come I’m sure... In the mean-time, could someone point out which settings - exactly - I need to set so that I don’t have any default styles?

    Thanks.
      • 25663 MODX Staff
      • 12,272 Posts
      The ULs are contained in the template files, which are likely chunks. Make sure you’re running the latest Wayfinder code, too.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 16466
        • 6 Posts
        Bummer. I updated to 2.0, and there’s no change. That, and I don’t have any chunks with UL’s in them... That and the template I’m using is very primitive and my own design, so I don’t have any code from another template. Oh no! What shall I do? laugh

        Thanks!
          • 25663 MODX Staff
          • 12,272 Posts
          Ditto will not insert anything that’s not in the template chunks.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 16466
            • 6 Posts
            Here is the exact content of every chunk I have configured on my install. Please tell me if I’m missing something:

            insertMenu
            [[Wayfinder? &startId=`0` &level=`2` &outerTpl=`wfOuter` &innerTpl=`wfParentRow` &parentRowHereTpl=`wfParentRow` &parentRowTpl=`wfParentRow` &activeParentRowTpl=`wfParentRow`&hereTpl=`wfParentRow`]]


            WebLoginSideBar
            <!-- #declare:separator <hr> --> 
            <!-- login form section-->
            <form method="post" name="loginfrm" action="[+action+]" style="margin: 0px; padding: 0px;"> 
            <input type="hidden" value="[+rememberme+]" name="rememberme"> 
            <table border="0" cellspacing="0" cellpadding="0">
            <tr>
            <td>
            <table border="0" cellspacing="0" cellpadding="0">
              <tr>
            	<td><b>User:</b></td>
            	<td><input type="text" name="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" size="5" style="width: 100px;" value="[+username+]" /></td>
              </tr>
              <tr>
            	<td><b>Password:</b></td>
            	<td><input type="password" name="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" size="5" style="width: 100px;" value="" /></td>
              </tr>
              <tr>
            	<td><label for="chkbox" style="cursor:pointer">Remember me:  </label></td>
            	<td>
            	<table width="100%"  border="0" cellspacing="0" cellpadding="0">
            	  <tr>
            		<td valign="top"><input type="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value="" [+checkbox+] onClick="webLoginCheckRemember()" /></td>
            		<td align="right">									
            		<input type="submit" value="[+logintext+]" name="cmdweblogin" /></td>
            	  </tr>
            	</table>
            	</td>
              </tr>
              <tr>
            	<td colspan="2"><a href="#" onclick="webLoginShowForm(2);return false;">Forget Password?</a></td>
              </tr>
            </table>
            </td>
            </tr>
            </table>
            </form>
            <hr>
            <!-- log out hyperlink section -->
            <a href='[+action+]'>[+logouttext+]</a>
            <hr>
            <!-- Password reminder form section -->
            <form name="loginreminder" method="post" action="[+action+]" style="margin: 0px; padding: 0px;">
            <input type="hidden" name="txtpwdrem" value="0" />
            <table border="0">
            	<tr>
            	  <td>Enter the email address of your account <br />below to receive your password:</td>
            	</tr>
            	<tr>
            	  <td><input type="text" name="txtwebemail" size="24" /></td>
            	</tr>
            	<tr>
            	  <td align="right"><input type="submit" value="Submit" name="cmdweblogin" />
            	  <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" /></td>
            	</tr>
              </table>
            </form>
            
            


            wfOuter
            <div id="menu"[+wf.classes+]>[+wf.wrapper+]</div>


            wfParentRow
            <div id="doc[+wf.docid+]"[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</div>
              • 25663 MODX Staff
              • 12,272 Posts
              Are you using the latest version of Wayfinder?
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 16466
                • 6 Posts
                I downloaded Wayfinder 2.0, I think it was, from the web site and installed it Saturday... So I think so.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Try clearing the cache. If that fails, please PM me a manager login.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 16466
                    • 6 Posts
                    Thanks, I’ve sent the info. I’m afraid clearing the cache again hasn’t helped. I appreciate the assist!
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Fixed. You did not have the actual plain-old "rowTpl" set in your call. I replaced your call simply with the following and it seems to work. You might wish to add some back now that it has removed the LIs.
                      [!Wayfinder? &startId=`0` &level=`2` &outerTpl=`wfOuter` &rowTpl=`wfParentRow`!]
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me