Menu block module overrides I'm really confused with how to theme menus in Drupal 7 and I've found the Menu block module which is supposed to makes things simpler. Turns out it's not that simple for me.

I've created a Menu block called "myfooter" and thanks to the Menu block documentation page I was able to determine that the mytheme_menu_link__menu_block__myfooter() function seems to be acting on the menu. Huzzah.

But I don't know how to use it at all. It's not as if there was a $variables inside and I could var_dump the var to try and understand what's in it.

Currently, I'm only doing the following to check that it's actually replacing my menu items by a simple print statement:

function mytheme_menu_link__menu_block__myfooter() {
  print 'test string';
}


Basically, my problem is that Drupal outputs the menu with an unordered list structure that I don't need.

&lt;ul class="menu"&gt;
  &lt;li class="lots of classes here"&gt;&lt;a href="/" title="" class="blah"&gt;Item1&lt;/a&gt;&lt;/li&gt;
  &lt;li class="lots of classes here"&gt;&lt;a href="/" title="" class="blah"&gt;Item2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


How can I wipe it to simply print my items one after another, with a pipe sign or dash or whatever separator I wish? Is mytheme_menu_link__menu_block__myfooter() even sensible to achieve that?

I've found a bunch of Drupal menu functions in the API but they are all so confusing I feel like I should stick to what Menu block offers.
Documentation for theme_menu_link():

function theme_menu_link(array $variables) {
  $element = $variables['element'];
  $sub_menu = '';

  if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
  }
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  return '&lt;li' . drupal_attributes($element['#attributes']) . '&gt;' . $output . $sub_menu . "&lt;/li&gt;\n";
}


The generated html needs to be returned as a return value.

The $variables argument has all the data.

Instead of var_dump(), you should install devel and do a dpm($variables). You might have to refresh the page twice to see the result.