[support] HTML displayed as text
Steve Edwards
killshot91 at comcast.net
Sun Mar 23 21:26:52 UTC 2008
I'm trying to edit my primary links menu to replace the text with a button image, and I'm having a problem with getting my <img>
tag to display. I've overridden the theme_menu_links() function in template.php, and it looks like what I need to do is replace
$link['title'] with the <img> tag. To do this, I added this line to the function:
$link['title'] = "<img src=\"images/btn_home.jpg\">";
However, the whole tag is displayed as text on the page, and when I view source, this is what I see for the link:
<li><a href="/drupal57/" title="Home page" class="active"><img src='images/btn_home.jpg'></a></li>
I don't understand this, because in other places in the function, that is how tags are written out in the code. What do I need to
change to get the actual quotes and < > symbols written out correctly?
Thanks.
Steve
More information about the support
mailing list