We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    My call displays the name of the parent but not the link.

    How do I make the title clickable?

    Thanks

    <h2>[[Wayfinder? &startId=`307` &level=`2`&displayStart=`true`]]</h2>


    Revo 2.2.6
      Content Creator and Copywriter
      • 36996
      • 211 Posts
      You need to create a startItemTpl, the default is does not have a link.
      You can use something like this (from the docs):
      <h2 class="menustart"><a href="[+wf.link+]">[+wf.linktext+]</a></h2>[+wf.wrapper+]

      and then in your wayfinder call:
      [[Wayfinder? &startId=`307` &level=`2`&displayStart=`true` &startItemTpl=`yourStartItemTpl`]]
      • You'll also need to modify the outerTpl, since that is the one that starts the <ul> tags. So start the <ul> tag in the startItemTpl, and for the outerTpl just use
        [[+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
          • 18367
          • 834 Posts
          OK tried that, only half worked.

          I got an output of

          [+wf.linktext+]

          [+wf.wrapper+]

          How do I make it show the actual link and correct title?

          Thanks

          I think did pretty much exactly what you both said above, although I'm no Wayfinder expert.

          startItemTpl
          <h2 class="menustart"><a href="[+wf.link+]">[+wf.linktext+]</a></h2><ul>[+wf.wrapper+]


          Outer
          [[+wf.wrapper]]
          </ul>


          Call
          [[Wayfinder? &startId=`307` &level=`2`&displayStart=`true` &startItemTpl=`StartItemTpl`]]


            Content Creator and Copywriter
          • Are you using Revo or Evo?
              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
              • 18367
              • 834 Posts
              Revo 2.2.6
                Content Creator and Copywriter
                • 36996
                • 211 Posts
                Sorry, the startItemTpl should be:
                <h2 class="menustart"><a href="[[+wf.link]]">[[+wf.linktext]]</a></h2>[[+wf.wrapper]]
                  • 18367
                  • 834 Posts
                  Ok, that worked,

                  Here's the final setup

                  <div>[[Wayfinder? &startId=`307` &level=`2`&displayStart=`true` &startItemTpl=`StartItemTpl`]]</div>


                  <h2 class="menustart"><a href="[[+wf.link]]">[[+wf.linktext]]</a></h2><ul>[[+wf.wrapper]]


                  [[+wf.wrapper]]
                  </ul>


                  Thanks
                    Content Creator and Copywriter
                  • If you don't want the start item to be part of the main menu, then ignore that about the outerTpl. That's only if you want the startItem to actually be part of the main menu.

                    If you want the startItem to be part of the main menu, the startItemTpl would look like this:
                    <ul>
                    <li [[+wf.classes]]><a href="[[+wf.link]]">[[+wf.linktext]]</a></li>
                    [+wf.wrapper+]

                    and the outerTpl would be
                    [[+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