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

    I am trying to make something quickly with MODx.

    I now have only one page.

    Can you please tell me how I can have the DromMenu snippet output this:

    <ul id="menu">
    <li><a class="active" href="#">Current page</a></li>
    </ul>

    So the current page menu item should be a link and it should have an active (here) class as well.

    What variables should I use with DropMenu to get this?

    I tried: [[DropMenu? &selfAsLink=’true’ &here=’active’]] but didn’t work.

    Thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can’t. You either get the ’here’ class for the active li element, or you get a link with no ’here’ class. I’ve got a hacked version that I call DropMenuM that has the ’here’ class and a link.

      http://modxcms.com/forums/index.php/topic,2609.msg17880.html#msg17880

      This puts the ’here’ class in the li element; if you want it in the a element you’ll have to do some hacking of the snippet code.
        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