Author Topic: view %item-comment% in tooltip  (Read 1270 times)

0 Members and 1 Guest are viewing this topic.

Offline radd

  • Tireless poster
  • ****
  • Posts: 145
    • View Profile
view %item-comment% in tooltip
« on: July 13, 2007, 01:01:00 PM »
from what i understand, let say i want comment of an item to come out in tooltip as i mouseover on the icon for example. i can use <img src="image.gif" title="%item-comment%" />.

however not work by this way. the tooltip show %item-comment%, not the comment.

do i have to put %comment% instead of %item-comment% but i believe tihs way will not work for my template (terayon) since %comment% defined as

[comment]
<div class=comment>%item-comment%</div>

but alt or title should only be in normal text.

are they any way to do this? That Steven Guy, you said u have javascript that can do this trick, can u show it to me?

and last, if an item do not have comment, can we prevent tooltip from showing or can we set it to show "no comment" ? hehehe.. too much to ask.. sorry guys. thanks

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: view %item-comment% in tooltip
« Reply #1 on: July 13, 2007, 01:03:22 PM »
if you want %comment% to be normal text, then go in the [comment] and remove the <div>, leave only text %item-comment%

Offline radd

  • Tireless poster
  • ****
  • Posts: 145
    • View Profile
Re: view %item-comment% in tooltip
« Reply #2 on: July 13, 2007, 01:12:57 PM »
i assume that could solve this prob, however i try avoid doing this because i afraid this will affect the template look. but i believe the div can be put before %comment% in [file] instead of having them under [comment].

ok la, i will try as u say. thanks

Offline radd

  • Tireless poster
  • ****
  • Posts: 145
    • View Profile
Re: view %item-comment% in tooltip
« Reply #3 on: July 13, 2007, 01:19:15 PM »
ok, it works! haha..

thanks

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: view %item-comment% in tooltip
« Reply #4 on: July 13, 2007, 01:25:02 PM »
sure, the point is: if there is no comment, the [comment] section is not used at all.

Offline radd

  • Tireless poster
  • ****
  • Posts: 145
    • View Profile
Re: view %item-comment% in tooltip
« Reply #5 on: July 14, 2007, 12:14:07 AM »
ok, i understand now. thanks