Tag Archives: Drupal

Drupal 7 inline menu item theming

Today I had to do a fairly common Drupal theming task, turning a menu block into a set of inline links. In pictures, I needed to go

from this: inline-links-2 to this:     inline-links-1

Since I usually do module dev and similar tasks for Koumbit, I was aware that Drupal already has a built in class for lists containing links that would display my links inline. That class is “links inline”. Unfortunately I wan’t sure how to go about changing those values at the theme layer. So I visited the API page of theme_menu_tree()hoping for some inspiration, and found some in this comment by wgsimon. A custom theme can override the theming of a specific menu item in Drupal 7 by using the pattern THEME_menu_tree__MENU_NAME().

Continue reading