0

I have a main menu block which i am showing at top-navigation. I need to theme main menu but not sure how to apply classes to the root level menu items and sub menus.

i tried below snippet but not getting result. Can anybody tell me how to achieve this.

$main_menu, 'attributes' => array( 'id' => 'main-menu', 'class' => array('links', 'navlist1', 'clearfix'), ), )); ?>

Below is the screenshot image which output i want to show in main-menu

enter image description here

1 Answer 1

0
  1. For a quick non-programmatic solution, you can consider using the Menu blocks module to render 2nd level menu items in 6 separate blocks, then render the blocks in the regions you want. On top of this you can also add customer classes on menu items with Menu attributes module.

  2. If you don't mind a javascript approach, you can manipulate dom to move the sub menus around.

  3. If you are familiar with the theme layer, you can create your custom theme function for main menu by implementing themename_links__system_main_menu.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.