Gallery module titles and comments on hover

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ivo647
New Member
New Member
Posts: 8
Joined: Fri Oct 11, 2013 5:37 am

Gallery module titles and comments on hover

Post by ivo647 »

I have installed the gallery module 1.6.1 version.
I am using a slimbox template with self modified css stylesheet.
I have a galleries with images, that contain both Title and Comment.

The problem is, when I hover over the images, the tooltip which appears over the images contains Title and Comments (including html tags, if I have them).

When looking at page source I see that title attribute contains both fields title and comments.

How do I make so that comments don't appear at all while hovering?

Any help appreciated.
Attachments
It looks like I need it when the photo is clicked on.
It looks like I need it when the photo is clicked on.
Id prefer only Title to appear, or nothing at all.
Id prefer only Title to appear, or nothing at all.
ivo647
New Member
New Member
Posts: 8
Joined: Fri Oct 11, 2013 5:37 am

Re: Gallery module titles and comments on hover

Post by ivo647 »

Well, I actually managed to solve it. :)
The reason why it showed title and comment was obivious, I had pasted both smarty tags in the title attribute.

The way I fixed it is I added a tittle attribute to within the <img> tag, and it somehow overrides the smarty tags within the <a> tag. So, now when I hover over the image I see the title specified within <img>, and when the image is opened I see title and comment from the <a> tag.

Not sure if this is the right way, but it does the job for me. :)

Code: Select all

<a href="{$image->file|escape:'url'|replace:'%2F':'/'}" title="{$image->title} <br /> {$image->comment|escape:'html'}" rel="lightbox[gallery]"><img title="{$image->title}" src="{$image->thumb|escape:'url'|replace:'%2F':'/'}" alt="{$image->titlename}" /></a>
Post Reply

Return to “Modules/Add-Ons”