I am using Superfish menus. I wanted to add a <span>
tag before each <a>
tag for menu links. I tried the following code:
function mytheme_menu_link($variables) {
$element = $variables['element'];
$sub_menu = '';
if (empty($element['localized_options'])) {
$element['localized_options'] = array();
}
$element['localized_options']['html'] = TRUE; //let l function know that our link title includes html
$output = l($element['#title'], $element['#href'], $element['#localized_options']);
return '<li' . drupal_attributes($element['#attributes']) . '><span>' . $output . "</span></li>\n";
}
but it did not take any effect. Since I am using Superfish menus do I need to write any other code?