I am theming my website and used the following code to print my main menu.
<?php $main_menu = variable_get('menu_main_links_source', 'main-menu'); $tree = menu_tree($main_menu); print render($tree); ?> Now, I need to have individual class name of each list item, so that I can call different background images using css. I would like to have class with name 'menu-497' as shown in screenshot. I couldn't figure out how this is done. Please help.
Old code which used to load individual list class is below. But this code won't load submenu, so I am not using it.
<?php print theme('links__system_main_menu', array( 'links' => $main_menu, 'attributes' => array( 'id' => 'topNav', ), )); ?>