Is there any solution to make certain menu output like this:

<li>menu item<span>menu description</span></li>

see this understand the reason http://photosharingworld.com/files/n0sx8mmrqrjhs0q0kkov.jpg

Comments

mooffie’s picture

One solution is to catch the 'primary_links' variable and massage it a bit:

function MYTHEME_preprocess_page(&$vars) {
  foreach ($vars['primary_links'] as $key => &$link) {
    $description = isset($link['attributes']['title']) ? $link['attributes']['title'] : '';
    $link['title'] = check_plain($link['title']) . ' <span>' . check_plain($description) . '</span>';
    $link['html'] = TRUE;
  }
}

(I haven't tested this code. It may contain bugs.)

waako’s picture

Have you looked at the modules:
Menu Attributes http://drupal.org/project/menu_attributes
Menu Class http://drupal.org/project/menuclass

Realise maybe not exactly what you want, but otherwise I'm guessing you would have to do something like mooffie said.

strategic code monkeying