We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1887
    • 50 Posts
    My secondary nav is a collection of text links:

    eg Latest News | 2006 | 2005 | 2004

    It all works great with Wayfinder although the last entry has a trailing " | " -- any tricks on how to stop this for the last menu entry?

    James
      • 17883
      • 1,039 Posts
      I would build the trailing "|" as a background-image. Then put it in the background (positioned on the right) of every list item via CSS . Put &lastClass=`last` to your wayfinder-call and li.last {background: none;} to your css. Result: No trailing | for the last item.
        • 7231
        • 4,205 Posts
        I do the same but instead of a BG image I use a border, partially because I am lazy, but also so that I can change the color if needed as well as have it resize with the menu.

        With wayfinder you can style the first and last as well as the current active document.

          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 1887
          • 50 Posts
          Thanks for the suggestions.

          I was trying to see if there was a snippet solution but menuindex is related to the parent. Would be wonderful if wayfinder had access to the menuindex of the current menu item it is processing.
            • 36624
            • 535 Posts
            hello,

            you can play with Ditto and &tplLast to make your menu. wink
              CTRL+SHIFT+U - Clear Cache
              CTRL+SHIFT+H - Hiding Heft Panel
              CTRL+SHIFT+N - Fast Create Resource
              CTRL+ALT+P - Preview Recource (in edit resorce window)
              CTRL+ALT+S - Save
              • 1887
              • 50 Posts
              Is there a way I can see the contents of "wf.classnames" within a snippet? If so I could test whether it contained the text "last" in it and not output the final "|"