Customise main-menu link - adding a '/' between  items I am using the Omega HTML5 base theme and am attempting to add a '/' delimiter between main_menu items on my site.

I have searched high and low and the closest I've come is the following:

function MYTHEME_menu_link(array $variables) {
$delimiter = '';
  // Only add delimiter to the main menu
  if (strpos($variables['element']['#theme'], 'main_menu') !== FALSE ) {
    // Only add delimiter if item is not the last one
    if (!in_array('last', $variables['element']['#attributes']['class'])) {
      $delimiter = '&lt;span class="delimiter"&gt;/&lt;/span&gt;';
    }
  }
  $element = $variables['element'];
  $sub_menu = '';

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


This actually works on any another template (just not OMEGA). Irrespective does anyone have an approach to adding this forward slash on main-menu items?

Thanks!
I would suggest a purely CSS approach to this. There is really no need to go through the trouble of adding a function to your theme for this change.

The following CSS code would get you (at least close to) the results you desire:

  ul.main-menu li:after {
    content: "/";
  }
  ul.main-menu li.last:after {
    content:"";
  }


The :after pseudo-class's support includes all browsers except IE 7 &amp; below and Firefox 3.0 and lower.