We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22427
    • 793 Posts
    If the client, maintaining the site, just adds new documents to the tree, Wayfinder automatically would reflect these changes. So I come back to a solution with Wayfinder instead of Ditto.

    By default, WF uses unordered lists for the output. So in the templates for the submenu if you replace the <ul><li>-structure by <span>, you will get the submenu items in a row with the main menu items. (For the main menu we keep the <ul> list but give the <li> items the format display:inline.)

    In detail:

    WF-call:
    [!Wayfinder? &startId=`0` &level=`2` &rowTpl=`myRowTpl` &innerTpl=`myInnerTpl` &innerRowTpl=`myInnerRowTpl` !]
    Chunk myRowTpl:
    <li style="display: inline;" [+wf.classes+]>
    <a href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]
    </li>
    Chunk myInnerTpl:
    <span [+wf.classes+]>[+wf.wrapper+]<span>

    Chunk myInnerRowTpl:
    <span [+wf.classes+]>
    <a href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]
    </span>
    That should do it. For the documents you don’t want to see in the menu just uncheck the "show in menu" option. Because the order you want is the same like in the documents tree, WF will order automatcally in the right way.

    With this solution it will be no problem for the client to maintain the site.

    All the best for your project!
    ottogal

      • 21417
      • 486 Posts
      Wow, thanks so much Ottogal.

      That sounds like it will work a treat with Wayfinder.

      I have actually already got it working perfectly in ditto with that other post but really appreciate your follow up:
      http://modxcms.com/forums/index.php/topic,43076.0.html

      I think I will run with the ditto method (given I already have it working) but will use this method for future similar instances.

      Thanks a million!

      Your input has been awesome.

      Cheers.

      Nick

        Web design Adelaide
        http://gocreate.com.au
        • 567
        • 8 Posts
        Ottogal,

        Thanks for the code up above.. I think it will shortly come in handy for me.

        ~Aerious