1

what would i have to do to change the menu output structure for my theme?

this is the current structure:

<ul class="menu">                                //menu
  <li><a href="">Home</a></li>
  <li>
    <a href="">Other Stuff</a>
    <ul class="menu">                            // sub-menu
      <li><a href="">Sub-Page 1</a></li>
      <li><a href="">Sub-Page 1</a></li>
    </ul>
  </li>
</ul>

what i would like to get is something like that:

<ul class="menu">
    <li><a href="#">Home</a></li>
    <li>
        <a href="#" class="drop">Other Stuff</a>  // the 'drop' class is for the styling of a menu item with child-items
        <div class="dropdown_1column">
            <div class="col_1">
            <a href="">Sub-Page 1</a>
            <a href="">Sub-Page 2</a>
            </div>
        </div>
    </li>
</ul>
  • did you get the solution? If yes then can you post the solution as an answer please.. – AjitS May 15 '12 at 9:57
1

Do you know of the nice menus module? Nice menus will allow you to make dropdown menus without writing any code on your own. You can also find instructions for customizing the Nice menus CSS here.

Nice menus has almost 60,000 installs as of this writing, indicating that it is likely to be supported well into the future compared to modules that aren't so popular.

| improve this answer | |
  • mhh... not quite what i was looking for. i tried it out but i saw no option to configure the output markup to my needs. also i wanted to use my own menu css styles that i already have – toxinlabs Mar 16 '12 at 18:01
  • What needs do you have that you weren't able to satisfy? – Patrick Kenny Mar 17 '12 at 0:11
  • there's one thing that i don't need and one thing that i can't do with the plugin. i don't need the nice menu css styles because i want to use my own styles that fit into my layout and not the predefined stuff. the thing i couldn't do (or at least i didn't find it) with the moduel is customizing the output markup so that i get the structure that i described above. and when i have the module and still have to modify my template files then i'm better off without the module because it doesn't add any useful functionality for me. – toxinlabs Mar 17 '12 at 15:47
  • but in the meantime i have the solution for my problem (80% finished). as soon as i got it running 100% i will describe the steps i took to adjust the menu output structure to my needs. – toxinlabs Mar 17 '12 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.