I am trying to insert a span inside of the anchor in the primary links. Hopefully I would like to avoid resorting to jquery, so I'm looking for other options. The dilemma is that the l() function does not leave room for inserting things inside the anchors. Also, I do not want to ruin any other functions that call upon theme_menu_item_link() by not using the l() function. So does anyone know of another way I can go about this? I only need to theme one menu into something that looks like this (I have yet to figure out another way that is standards compliant)

 <ul>
  <li><span class="spacer"></span></li>
  <li><a class="a link"><span>Link1</span></a></li>
  <li><a class="a link"><span>Link2</span></a></li>
  <li><span class="spacer"></span></li>
 </ul>

Comments

zeta ζ’s picture

<?php l('<span>' . check_plain($Link2) . '</span>', $path, array('html' => 1)) ?>
___________________
It’s in the detaιls…

demonstration portfolio

Jonathan.D’s picture

Great. That'll do it. Thanks Zeta.

RockSoup’s picture

this worked well for me when I recently needed to do the same thing in 5.7...

http://drupal.org/node/130177#comment-237501

good luck