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

    in my menus I want to have rulers between the items. The templates that WF makes available allow me only to create menu items themselves, but I am wondering how to create anything between these.

    The nearest I have come to what I want is that I have tried to put the rulers above each of the items via rowTpl, then making sure that the first ruler will not be displayed. However, I don’t know how that can be done, as the ruler and the menu item are, for WF, inside the same row, and application of, say, display:none, makes the whole row invisible, not just the ruler.

    The neatest thing to have would be a &separatorTpl in WF, but as far as I can see, there is no such thing.

    Greets,
    René
      • 7231
      • 4,205 Posts
      I don’t understand what you mean by ruler. Do you mean a menu like this:

      page 1 | page 2 | page 3 | etc...

      This can be accomplished by using css, or you can edit the outerTpl and the rowTpl to do this manually but you will not be able to control the last one.
        [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]
        • 21163
        • 18 Posts
        By ruler I mean a <hr>. These guys need to go in <li>’s of their own. I thought that was some kind of problem yesterday, then it came to me that I can just give it a <hr [+classes+]> with display:none for the last one --- for <hr>’s only, of course! Not for the whole item containing it and the menu item.

        A little problem is, however, that this method does not work if there is just one item in the menu level, because &lastClass is not applied in this case. OK, one can avoid one-item levels, but there are situations possible where you want just that, and then we’d get into a little trouble.

        Thanks!
        René
          • 25663 MODX Staff
          • 12,272 Posts
          Use the first class option also, and then define the first class in your css after the last class and problem solved.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me