We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32519
    • 94 Posts
    I just want my home page to show up on my topnav bar. I can’t get the displayStart parameter to work no matter what I try. I have read countless Wayfinder docs as well as many, many forum posts, and I am just as lost as when I first started. I must be a retard when it comes to this. I’m actually getting the hang of the rest of modx, but this one thing is driving me crazy. It should be simple right? If someone can give me an easy-to-follow breakdown of how to get my home page link to display on my navbar, you will have made my day. I’ll show you what I have going on right now with my navbar, an maybe you can see what I’m doing wrong.

    My current navbar settings are like this in css.

    <div id="topnav">
    <div id="topnav li">
    <div id="topnav ul">
    [[Wayfinder? &level=`1` &limit=`7` &includeDocs=`2,3,4,5,6,7` ]]
    </div>
    </div>
    </div> (the #div’s are located in my style.css sheet if you wanna look at it)
    Oh yeah, my site is http://www.themovietimeline.net/modx/

    My topnavbar as it is displays just how I want it (minus the home page). Then, I try and add the displayStart:

    <div id="topnav">
    <div id="topnav li">
    <div id="topnav ul">
    [[Wayfinder? &startId=`1` &displayStart=`TRUE` &startItemTpl=`home` &limit=`7` ]]
    </div>
    </div>
    </div>

    My template would look something like this:
    <a href="[+wf.linktext+]">[+wf.wrapper+]</a>
    or
    <a href="[+wf.link+]">[+wf.title+]</a>
    or
    <h2>[+wf.linktext+]</h2>[+wf.wrapper+] (like it shows on muddydog)
    and
    many other variations. I have also tried many variations on the Wayfinder callout itself, as well as taking it out of my topnav div and such, but nothing seems to work for me. I must be overlooking something very basic with how the Wayfinder operates. I’m still pretty new to modx, but I’ve managed to make everything else work that I have tried, with only half as much effort, so I don’t know what else to try.

    Thanks if you help.
      <a href="http://www.themovietimeline.net">The Movie Timeline</a> | <a href="http://www.antstuff.net">The Antfarm Site</a>
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      displayStart works off of the startId. If the startId has no children, you’ll get no menu items.

      Have you considered having something like this
      <ul><li><a href="[~1~]">Home</a></li>
      [!Wayfinder ... !]

      And your Wayfinder outerTpl would be
      [+wf.wrapper+]</ul>

      So your hand-coded homepage link would start the main outer UL, while the Wayfinder outerTpl would just load in the rest of the <li> rows then end the main outer 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
        • 32519
        • 94 Posts
        No I hadn’t considered that. Sometimes, the <li> and <ul> tags intimidate me a bit, so I don’t like to mess with them. Your solution seems pretty simple though. It should work for what I’m trying to do. I’ll give that a try. Thanks!
          <a href="http://www.themovietimeline.net">The Movie Timeline</a> | <a href="http://www.antstuff.net">The Antfarm Site</a>