We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11429
    • 90 Posts
    Is there any parameters to include a separator between horizontal links ?

    ie link1 | link2 | link3 |
      • 25663 MODX Staff
      • 12,272 Posts
      Just add them to your row/item templates.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 11429
        • 90 Posts
        what are row items ?

        I am using just one snippet to produce the menus

        do you mean using one snippet per menu item ? ie snippet1 | snippet2 | ?
          • 25663 MODX Staff
          • 12,272 Posts
          Make sure you’re using the most recent version of Wayfinder. It uses templates to define the output. Each item in your menu is a "row", the template would just include separators.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 11429
            • 90 Posts
            ok i’m still not sure i understand

            in creating the row template how would that look ?

            ie rowtpl=`separator`

            and just include | ?
              • 29181
              • 480 Posts
              [!Wayfinder?&rowTpl=`separator`!]


              where separator is a chunk that looks something like:
              <a href="[+wf.link+]">[+wf.linktext+]</a> |


              But how can I omit the last menu item’s separator?

              so that it looks like this:

              Menu item | Menu item | Menu item | Menu item

              I have looked at the documentation and seen that you can use &lastClass for defining a different CSS class, but is there a way of doing to same for the template?

              If I use debug I get

              Item Processed: (6) Kontakt
              template: rowTpl | class: last
              level: 1 | First/Last: 0/1

              for the last item...so I live in hope with Last being set to 1

              Thanks for any pointers!

              Taff
                Adrian Lawley: www.adrianlawley.com
                • 25663 MODX Staff
                • 12,272 Posts
                Make your &rowtpl:
                <a href="[+wf.link+]">[+wf.linktext+]</a><span[+wf.classes+]> |</span>


                Set your &lastCSS=`last` and use the following CSS:
                span.last {display:none}
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 29181
                  • 480 Posts
                  The solution is so simple it hurts grin

                  Thanks for your help rthrash!
                    Adrian Lawley: www.adrianlawley.com
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Not a problem and glad it works for you. smiley
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 11429
                      • 90 Posts
                      does this also work for vertical menus ? want to add a >> to the left of each menu