[support] HTML displayed as text
Steve Edwards
killshot91 at comcast.net
Mon Mar 24 14:25:32 UTC 2008
I tried doing that, but I haven't had any luck with that. Would I use
the background-image property for the list item? Or is there a better
property to use?
Steve
Michael Prasuhn wrote:
> While this isn't exactly the answer to your question, which I see that
> you found on your own. I would definitely recommend doing the image
> replacement via CSS, so that print and screen reading versions of your
> site don't have any loss of experience. In my experience this also is
> better for browsers that have images turned off as well.
>
> -Mikey P
>
>
> On Mar 23, 2008, at 2:26 PM, Steve Edwards wrote:
>
>> 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
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
>
> __________________
> Michael Prasuhn
> mike at mikeyp.net
> http://mikeyp.net
> 949.200.7595
> 714.356.0168 cell
> 949.200.7670 fax
>
>
>
More information about the support
mailing list