Trying to add a class to a menu in a preprocess function I want to add a class to a menu - doing it in hook_menu won't work because I'm adding an icon with the icon API, and this seems to override any classes put on the menu items.

I have this preprocess function:

/**
 * hook_preprocess_page().
 */
function MYMODULE_preprocess_page(&amp;$vars) {
  $vars['main_menu']['menu-1914']['attributes']['class'] = array('message');
}


But it doesn't seem to add the css class "message" onto my element.

How do I reliably add a css class to a menu item before display, but before icon API would display it. Theming has to be my weakest Drupal skill.
To add class in navigation's &lt;ul&gt; element, include below code in template.php

function THEMENAME_menu_tree__menu_MENUNAME($variables) {
return '&lt;ul class="CLASSNAME YOU WANT TO ADD"&gt;' . $variables['tree'] . '&lt;/ul&gt;';
}