Hi,
I'm guessing, somewhere in your page.tpl.php
, you have something like this to display the primary menu :
print theme('links', $primary_links, array('class' => 'links primary-links'));
One solution (might not be the cleanest one -- but should work) would be to iterate on the elements of $primary_links
, to, for each one, :
- activate HTML mode
- wrap the
title
with <span>
and </span>
If your menu has only one level, I suppose this would do :
foreach ($primary_links as & $link) {
$link['html'] = true;
$link['title'] = '<span>' . $link['title'] . '</span>';
}
And, after that, you can call theme
like you're already doing now.
With that, you should get <span>
tags arround the text of the link, without having them injected in the title
's attribute of the <a>
tags.
I you have more levels in your menu, you will have to iterate farther down ; either with two imbricated loops, or with some kind of recursion if you don't know the depth of your menus.
(I'll let you have fun with that ; what I said should be enough to get you started ;-) )
As a sidenote, this could probably done somewhere in template.php
too... Might be a better place ; but I'll let you decide which solution you prefer...
Have fun !