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

    Using Wayfinder to generate some navigation links, but the parent (top level) link becomes a dropdown title and loses it's link. It's a page I need to be able to access. Is there a simple way to add that top level link to the dropdown with it's children?

    I thought &displayStart=`true` would accomplish this but it doesn't seem to be working.

    [[Wayfinder?
       &startId=`0`
       &displayStart=`true`
       &level=`2`
       &outerTpl=`tpl.Wayfinder.outer`
       &parentRowTpl=`tpl.Wayfinder.row.parent`
       &innerRowTpl=`tpl.Wayfinder.row.inner`
       &rowTpl=`tpl.Wayfinder.row`                    
    ]]
    

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      See the &startItemTpl, you can make it any kind of link you want. You can include it in your menu by manipulating the outer tpl and the startItemTpl.

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

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

      As you can see, have the startItemTpl open the UL element, generate the LI and link for the parent item, then let Wayfinder continue processing. The outerTpl just processes the rest of the menu and closes the 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