We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19646
    • 31 Posts
    HI folks

    I like many other are not new to web design etc but am new to MODx.

    I am trying to create a menu that will output as follows

    menu item | menu item | menu item

    as you see the is NO "|" after the last menu item.

    I have had no problem creating the following with

    &rowTpl=`cssplay_parentRow`

    the chunk cssplay_parentRow == <li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>&nbsp;|&nbsp;

    this outputs the following


    menu item | menu item | menu item | huh (note the last "|" on the end of the menu list that I don’t want displayed)


    PLEASE can some kind soul help me solve this issue

    regards

    Minty the Dalek
      • 7231
      • 4,205 Posts
      Wayfinder does not have a last tpl, it does however have a lat class that it can apply to the last result. The way to do what you are wanting is to use css to style the output rather than using the pipe |.

      Ditto had a lastTpl.
        [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&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 19646
        • 31 Posts
        Thanks for your reply,

        The pipe is a client specific request.

        One suggestion I though of was just to hide the last | with CSS by colouring it white as it’s on a white background but it didn’t seen to be a "best fix"

        Any other suggestions or more information would be very gratefully recieved

        regards and thanks in advance
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You can emulate a "pipe" by giving your link’s containers a border-right, and then the .last gets a border-right:none in the css.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 19646
            • 31 Posts
            That’s a really good idea and with a little padding looks great

            thanks folks for all your efforts

            grin