Page 1 of 1

Gallery module titles and comments on hover

Posted: Wed Jun 11, 2014 7:05 am
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.

Re: Gallery module titles and comments on hover

Posted: Wed Jun 11, 2014 8:14 am
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>