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

    I cannot get my head around configuring Wayfinder at all. Can anyone tell me if Wayfinder is able to create the following menu? and if so how do I go about doing it?

    <ul class="col12 last">
                        <li>
                            <a href="#">Home<br><span>The Start</span></a>
                        </li>
                        <li>
                            <a href="#">Work<br><span>What I've done</span></a>
                        </li>
                        <li>
                            <a href="#">Services<br><span>What I do</span></a>
                        </li>
                        <li>
                            <a href="#">Pricing<br><span>What I charge</span></a>
                        </li>
                        <li>
                            <a href="#">About Me<br><span>Who I am</span></a>
                        </li>
                        <li>
                            <a href="#">Testimonials<br><span>What clients say</span></a>
                        </li>
                        <li>
                            <a href="#">Contact<br><span>Get in touch</span></a>
                        </li>
                    </ul>
    


    This has been frustrating me for several days so my sincere thanks in advance to anyone who can solve it for me.

    This question has been answered by multiple community members. See the first response.

    [ed. note: pixelboxdesign last edited this post 13 years, 6 months ago.]
    • discuss.answer
      • 8274 ☆ A M B ☆
      • 222 Posts
      You would want to create a new chunk to act as a rowTpl to get the <li>'s to render the way you want.

      as far as the content, I assume "Home" is the page title, and "The Start" is the long title. Then your rowTpl chunk would look like

      <li><a href="#">[[+pagetitle]]<br/><span>[[+longtitle]]</span> </a></li>


      The placeholders can be any standard placeholder to a resource:
      http://rtfm.modx.com/display/revolution20/Commonly+Used+Template+Tags

      Just be sure to change the "*" to a "+" so that Wayfinder knows it is a placeholder.

      To use add the &rowTpl=`YourRowTplName` to your Wayfinder call


      • discuss.answer
        • 28042 ☆ A M B ☆
        • 24,524 Posts
          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
          • 34155
          • 10 Posts
          Awesome thanks. Should the wayfinder call be in the form:

          &rowTpl=`[[$ChunkName]]`


          and how do I get classes into the <ul> generated by Wayfinder.
          • discuss.answer
            • 37105
            • 194 Posts
            Noop, just use
            &rowTpl=`chunkName`

            Please read the manual: http://rtfm.modx.com/display/ADDON/Wayfinder+Introductory+Examples

            The part
            Outer Wrapper: formatting the <ul>
            will answer your second questions! [ed. note: donquicky last edited this post 13 years, 6 months ago.]
              Codeplaza Webdesign: for professional websites at low cost
              • 34155
              • 10 Posts
              Excellent almost cracked it. The only thing I'm toiling with is getting Wayfinder to create the link urls I've tried the following rowTpl but it's not happening?

              <li><a href="[+wf.link+]">[[+pagetitle]]<br/><span>[[+longtitle]]</span></a></li>
              • discuss.answer
                • 34155
                • 10 Posts
                Ahh I was on the right track but had the placeholder slightly wrong. It should have been

                <li><a href="[[+wf.link]]">[[+pagetitle]]<br/><span>[[+longtitle]]</span></a></li>


                Many thanks for all your help everyone one day I'll figure out Wayfinder I hope.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  The "almost complete guide" I'm hosting on my site is an excellent reference, and the cheatsheet is something I can't work without.
                    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
                    • 34155
                    • 10 Posts
                    Yeah those look like fantastic resources, I've grabbed a copy. I think a lot of my confusion is caused by reading some things that are written for Revo and some written for Evo then mixing the two up. However, that doesn't alter or excuse that fact that my coding skills beyond HTML/CSS are sorely lacking.