I need <span>
tags around strings on my menu items. Trying to use this answer but it does not work for me. I probably just need some guidance in terms of naming things (just started on Drupal).
My theme folder name is sub_website
, it is inheriting from theme called website
(set by base theme = website
in sub_website/sub_website.info
). The menu in question is named 'Primary menu', it is selected as "source for the primary links" in the settings, and it is accessible via /admin/build/menu-customize/primary-links
URI.
I tried adding the following into the sub-theme's template.php
:
function sub_website_links__system_primary_links_menu($variables) {
foreach ($variables['links'] as $link) {
$output .= l('<span>'. check_plain($link['title']) .'</span>', $link['href'], $link);
}
return $output;
}
What am I doing wrong? Am I not clearing the cache properly? Did I not name the function correctly? Is there no such hook in Drupal 6? Documentation is very fragmented and is further complicated by two major versions existing side by side.