We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1343 ☆ A M B ☆
    • 2,213 Posts
    Hello,

    I am working on a template with wayfinder and noticed a problem I can’t explain or even start to fix as wayfinder has me lost in general...

    More or less it’s creating single link menus for lack of better wording...

    I actually have two menus in the template one uses UL/LI the other you can see below, I included the chunks from both partly because i’m lazy and partly because the pizza man just showed up.

    Can anyone tell me what the heck I’m doing wrong here?

    Thanks a TON!
    AMDbuilder


    Example 1 is what I get and example 2 is what I want:

    [!Wayfinder?startId=`0` &outerTpl=`flex_c2_outerTpl` &rowTpl=`flex_c2_rowTpl` &parentRowTpl=`flex_c2_parentRowTpl` &innerRowTpl=`flex_c2_innerRowTpl` &innerTpl=`flex_c2_innerTpl`!]

    <dl class="nav3-grid">
    	<dt><a href="#/" title="Home">Home</a></dt>
    </dl>
    <dl class="nav3-grid">
    	<dt><a href="#" title="Forum">Forum</a></dt>
    </dl>
    <dl class="nav3-grid">
    	<dt><a href="/5.php" title="Yearly Conference">Yearly Conference</a></dt>
    </dl>
    <dl class="nav3-grid"><dt><a href="/115.php" title="About Us">About Us</a>
    	<dd>
    	<dd><a href="/17.php" title="Officers">Officers</a></dd>
    	</dd>
    </dt>
    </dl>
    
    <dl class="nav3-grid"><dt><a href="/116.php" title="Competitions">Competitions</a>                <dd>
    <dd><a href="/4.php" title="About the us">About Us</a></dd>
    <dd><a href="/6.php" title="Competitions">Competitions</a></dd>
    <dd><a href="/83.php" title="Competition Results">Competition Results</a></dd>
                                    
                    </dd></dt></dl>
    <!-- Navigation item -->
    <dl class="nav3-grid"><dt><a href="/117.php" title="Membership">Membership</a>                <dd>
    <dd><a href="/9.php" title="Join the us">Join the us</a></dd>
    
    <dd><a href="/10.php" title="Services">Services</a></dd>
                                    
                    </dd></dt></dl>
    <dl class="nav3-grid"><dt><a href="/8.php" title="Affiliated Clubs">Affiliated Clubs</a></dt></dl>
    <dl class="nav3-grid"><dt><a href="/12.php" title="Links">Links</a></dt></dl>
    <dl class="nav3-grid"><dt><a href="/13.php" title="Events">Events</a></dt></dl>
    <dl class="nav3-grid"><dt><a href="/11.php" title="Contact Us">Contact Us</a></dt></dl>
    


    Should be:

            <dl class="nav3-grid">
              <dt><a href="#/beta/index.php">Home</a></dt>
              <dt><a id="i1" class="toggle" title="Click to Expand / Collapse" href="#">About Us</a></dt>
    			<dd class="itemi1"><a href="#/beta/about.php">About Us</a></dd>
    			<dd class="itemi1"><a href="#/beta/history.php">History</a></dd>
                <dd class="itemi1"><a href="#/beta/newsletters/index.php">Newsletter</a></dd>
                <dd class="itemi1"><a href="#/beta/officers.php">Officers</a></dd>
              <dt><a href="#">Forums</a></dt>
              <dt><a href="#/beta/conference.php">Conference</a></dt>
              <dt><a id="i2" class="toggle" title="Click to Expand / Collapse" href="#">Competitions</a></dt>
    			<dd class="itemi2"><a href="#/beta/comp_print.php">Print and Slide Division</a></dd>
                <dd class="itemi2"><a href="#/beta/comp_digital.php">Digital Division</a></dd>
                <dd class="itemi2"><a href="#/beta/comp_best.php">Best Photo of the Year</a></dd>
                <dd class="itemi2"><a href="#/beta/results.php">Competition Results</a></dd>
              <dt><a href="#/beta/quarterly.php">The Quarterly</a></dt>
    		  <dt><a href="#/beta/tutorials.php">Tutorials</a></dt>
              <dt><a href="#/beta/affiliated.php">Affiliated Clubs</a></dt>
              <dt><a id="i3" class="toggle" title="Click to Expand / Collapse" href="#">Membership</a></dt>
    			<dd class="itemi3"><a href="#/beta/whyjoin.php">Why Join</a></dd>
                <dd class="itemi3"><a href="#/beta/services.php">Services</a></dd>
                <dd class="itemi3"><a href="#/beta/faq.php">F.A.Q.</a></dd>
    			<dd class="itemi3"><a href="#/beta/signup.php">Sign-Up</a></dd>
              <dt><a href="#/beta/links.php">Links</a></dt>
              <dt><a href="#/beta/calendar/">Upcoming Events</a></dt>
              <dt><a href="#/beta/contact.php">Contact Us</a></dt>
            </dl>
    
    

      Patrick | Server Wrangler
      About Me: Website | Tweets |  MODX Hosting
      • 7231
      • 4,205 Posts
      Couldn’t open the zip file. It is better to just copy the tpl chunk ino the forum post so that everyone can see easily. By looking at he results it seems that you have misplaced the wayfinder wrapper.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Hello,

        I had a feeling it was something I was doing...

        Here’s the chunks...

        flex_c2_innerRowTpl.txt
        <dd><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</dd>
        


        flex_c2_innerTpl.txt
                        <dd>
        [+wf.wrapper+]                                
                        </dd>
        


        flex_c2_outerTpl.txt
        [+wf.wrapper+]
        


        flex_c2_parentRowTpl.txt
        <!-- Navigation item -->
        <dl class="nav3-grid"><dt><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</dt></dl>
        


        flex_c2_rowTpl.txt
        <!-- Navigation item -->
        <dl class="nav3-grid"><dt><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</dt></dl>


        m2_parentRowTpl.txt
        <!-- Navigation item -->
        <ul><li><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]<!--[if IE 7]><!--></a><!--<![endif]-->[+wf.wrapper+]</li></ul>


        I think I got them all, but I didn’t do the best job naming them so you knew which related to the top and side menus... If I missed one let me know.

        Thanks
        AMDbuilder
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 25663 MODX Staff
          • 12,272 Posts
          Start by tweaking the templates and I suspect you’ll be a bit closer (totally untested):

          outer:
          <dl class="nav3-grid">
          [+wf.wrapper+]</dl>


          parent row:
            <dt><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a></dt>
          [+wf.wrapper+]
          


          inner:
          [+wf.wrapper+]
          


          inner row:
              <dd class="item[+wf.id+]"><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</dd>
          


          You’ll need to add some classes/titles to the templates above but I think it will get the structure sorted out.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            Hello,

            Thanks for the revised code, it’s an improvement, but still has issues with validation and such...

            I will look everything back over when I get back later tonight, but if anyone sees the problem beforehand please let me know!

            Thanks again,
            AMDbuilder

            Here is the updated output:

            <dl class="nav3-grid">
            
            <!-- Navigation item -->
            <dl class="nav3-grid"><dt><a href="#" title="Home">Home</a></dt></dl>
            <dt><a href="/115.php" title="About Us">About Us</a></dt>
            <dd class="item"><a href="/about.php" title="About Us">About Us</a></dd>
            <dd class="item"><a href="/officers.php" title="Officers">Officers</a></dd>
            <dd class="item"><a href="/history.php" title="Our History">Our History</a></dd>
            
            <!-- Navigation item -->
            <dl class="nav3-grid"><dt><a href="#" title="Forum">Forum</a></dt></dl>
            <!-- Navigation item -->
            <dl class="nav3-grid"><dt><a href="/affiliated.php" title="Affiliated Clubs">Affiliated Clubs</a></dt></dl>
            
            <dt><a href="/116.php" title="Competitions">Competitions</a></dt>
            <dd class="item"><a href="/print_slide_division.php" title="Print and Slide Division">Print and Slide Division</a></dd>
            <dd class="item"><a href="/digital_division.php" title="Digital Division">Digital Division</a></dd>
            <dd class="item"><a href="/year_end_competition.php" title="Year End Competition">Year End</a></dd>
            <dd class="item"><a href="/forms.php" title="Competition Forms">Forms</a></dd>
            <dd class="item"><a href="/results.php" title="Competition Results">Competition Results</a></dd>
            
            <!-- Navigation item -->
            <dl class="nav3-grid"><dt><a href="/conference.php" title="Conference">Conference</a></dt></dl>
            <dt><a href="/tutorials.php" title="Tutorials">Tutorials</a></dt>
            
            <dd class="item"><a href="/tutorials_photography.php" title="Photography">Photography</a></dd>
            <dd class="item"><a href="/tutorials_photoshop.php" title="Photoshop">Photoshop</a></dd>
            <dd class="item"><a href="/tutorials_lightroom.php" title="Lightroom">Lightroom</a></dd>
            
            <dt><a href="/117.php" title="Membership">Membership</a></dt>
            <dd class="item"><a href="/whyjoin.php" title="Why Join?">Why Join?</a></dd>
            <dd class="item"><a href="/services.php" title="Services">Services</a></dd>
            <dd class="item"><a href="/application.php" title="Sign-Up">Sign-Up</a></dd>
            
            <!-- Navigation item -->
            
            <dl class="nav3-grid"><dt><a href="/links.php" title="Links">Links</a></dt></dl>
            <!-- Navigation item -->
            <dl class="nav3-grid"><dt><a href="/events.php" title="Events">Events</a></dt></dl>
            <!-- Navigation item -->
            <dl class="nav3-grid"><dt><a href="/contact.php" title="Contact Us">Contact Us</a></dt></dl>
            </dl>
            
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting
              • 1343 ☆ A M B ☆
              • 2,213 Posts
              Hello,

              I further examined the output and it appear that it’s getting things mostly correct, but it’s messing up when I have single links vs drop down links.

              The DL tags should only be used 2x as the first and last line of the entire menu and the single links should be enclosed in just DT tags. Seeing as how I don’t really follow how to control the output format can anyone shed some light on how to resolve this issue?

              Thanks
              AMDbuilder
                Patrick | Server Wrangler
                About Me: Website | Tweets |  MODX Hosting
                • 7231
                • 4,205 Posts
                I think that you need to add a &rowTpl chunk or just change the &parentRowTpl to simply &rowTpl might work.
                  [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                  Something is happening here, but you don&#39;t know what it is.
                  Do you, Mr. Jones? - [bob dylan]
                  • 1343 ☆ A M B ☆
                  • 2,213 Posts
                  Jackpot!

                  I changed ParentRow to Row like suggested and I also changed the code to this:

                  <dt><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</dt>
                  


                  I’m one step closer to finishing this template and a major website overhaul! Now to fix the top menu....

                  flex_c2_top_outerTpl.txt
                  [+wf.wrapper+] 


                  flex_c2_top_rowTpl.txt
                  <!-- Navigation item -->
                  <ul><li><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li></ul>


                  flex_c2_top_innerTpl.txt
                  <!--[if lte IE 6]><table><tr><td><![endif]-->
                                  <ul>
                  [+wf.wrapper+]                                
                                  </ul>
                  <!--[if lte IE 6]></td></tr></table></a><![endif]-->


                  flex_c2_top_innerRowTpl.txt
                  <li><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>


                  I tried the same fix on this menu and well... that did way more harm than good, but that could be due to structuring problems similar to earlier.

                  Thanks
                  AMDbuilder
                    Patrick | Server Wrangler
                    About Me: Website | Tweets |  MODX Hosting
                    • 7231
                    • 4,205 Posts
                    Without seeing the expected results it is guesswork, but here goes some stuff off the top of my head that look off:

                    Change the outerTpl to:
                    <ul>
                    [+wf.wrapper+]
                    </ul>


                    then change the rowTpl to:
                    <!-- Navigation item -->
                    <li><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>


                    Getting familiar with the different Tpl layers is a bit tricky, and sometimes trial and error is the only way to go. This doc has a good visual representation of the tpl layers.

                    http://wiki.modxcms.com/images/f/fa/Wayfinder200_docs_v6.zip
                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don&#39;t know what it is.
                      Do you, Mr. Jones? - [bob dylan]
                      • 1343 ☆ A M B ☆
                      • 2,213 Posts
                      DOA, I found my problem I swapped some of my chunk code... embarrassed

                      Problem resolved...

                      Thanks for all the help everyone!
                      AMDbuilder
                        Patrick | Server Wrangler
                        About Me: Website | Tweets |  MODX Hosting