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

    I just want to get used to modx and currently working with Wayfinder. I found the following navigation [1] and want to implement it with Wayfinder. The non-ressource item search-box causes a problem.
    When I add the element search to the ul-list via the chunk outerTpl I cannot fix the issue of to many "last" classified il-elements.

    Each navigation would cause the same problem if you want to position custom item between two other ressource items

    I have already read the Wayfinder PDF book in part, but I have no idea how that could be implemented without some snippet PHP hacks. Is there a clean solution that I have overlooked?

    Many thanks in advance for your effort.

    [1] http://lwis.net/free-css-drop-down-menu/dropdown.vimeo.com.html

    ~System

    Using Wayfinder: 2.3.1
    ModX: 2.1.3
      • 36404
      • 307 Posts
      hi,

      two different things here

      - the "last" issue is not really one as you can tell wayfinder to use another classname for its last items or use yourself another one for you search extra element, wayfinder's one may still be useful for you to style the last element of a dropdown (no bottom border for ex)

      - the other issue is if you really want to add extra elements between wayfinder generated li (if it just some decoration js would do the trick)
      -- you may put those element as weblinks or else in your site tree
      -- or write a snippet to generate your menu using modx api, really easy in evo (don't know in revo but, as i may still have some usage of my family jewels i'm not going to give any opinion about this here, let's say it will be even easier smiley)

      have swing
        réfléchir avant d'agir
        • 22427
        • 793 Posts
        Normally you have a WF call like
        [[!Wayfinder? &startId=`0` &outerTpl=`myOuterTpl` &rowTpl=`myRowTpl`]] 
        with more or less these chunks:

        myOuterTpl:
        <ul id="topnav" [[+wf.classes]]>
        [[+wf.wrapper]]
        </ul>

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

        Try to just add a static last row to the menu, inserting it after the [[+wf.wrapper]] like this:

        &outerTpl:
        <ul id="topnav" [[+wf.classes]]>
        [[+wf.wrapper]]
        <li><a href="[[~77]]">Search Box</a>.......</li>
        </ul>

        Here you could replace the dots by an extra WF call for the sub items of the Search.