How to add custom fields to menu items I've been looking at using menu attributes module for Drupal 7 to add an extra field to the menu navigation system. However this adds a new attribute to the attribute array and thus prints it out in the anchor link.

e.g.

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

  if ($element['#below'])
  {
    $sub_menu = drupal_render($element['#below']);
  }

  $element['#localized_options']['html'] = TRUE;

  $subtitle = $element['#localized_options']['attributes']['subtitle']; //get sub text

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


But it comes out like this

&lt;a subtitle="subtitleexampletext" href="/node/13"&gt;About us&lt;span&gt;subtitleexampletext&lt;/span&gt;&lt;/a&gt;


is there anyway to hide the attribute in the link and just spit it out where ever I want it in the html? Or is there a better way of doing this? I've looked at power menu module as well, but thats not quite what I'm after either.

TIA
You can use hook_form_alter to alter the menu link edit form. 
This way you can add a extra field to the form, in your case:

$form['subtitle'] = array(
 '#type'=&gt;'textfield',
 '#title'=&gt; t('Subtitle'),
);


Then add an extra submit hanlder to the form:

$form['#submit'][] = '_my_submit_handler';


In your submit handler you can access your custom value by using $form_state['values']['subtitle'].

You will have to store this value in an extra sql table or a variable_set,together with the menu-item ID.

Once you have done that, in your theme function you can access your subtitle by menu id.
Or you can use  MYTHEME_preprocess_menu_link to add extra info to $variables, which you then can access in your theme function.

Hopes this helpes you out.