We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I wanted to have a fancy Suckerfish dropdown type menu, but I wanted each dropdown to have a different style. So I added an incremented variable to the place where the "category" class is added, so now it will say class="category1", class="category2" etc, and I can style each one in the CSS.

    Line 217, just before the foreach loop:
    $categoryNumber = 1;


    Line 277:
    $class .= ($class ? ' ' : '').$categoryClass.$categoryNumber;


    Line 298, just before the loop ends:
    $categoryNumber++;
      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
      • 6726
      • 7,075 Posts
      I love suckerfish too smiley

      This is a very nice tip and will allow for some pretty cool styling, thanks a lot !
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
      • In redoing the main marketing site, I found a couple of bugs with DropMenu. There’s also a bug or two listed in the tracker. Perhaps we should consolidate all the wishes and bugs and work on it for 0.9.2. I think it could be simpler and better documented for one.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me