I have a hard time believing this question hasn't been asked, but I can't find it anywhere on the forums.
How can I add the title attribute to images in my gallery?
No, that's not what I'm talking about.
The title attribute in the img tag of the html, <img src="picture.jpg" alt="my picture" title="this is My Picture" />, the "tool tip" that displays when you hover your mouse over the image. All that I get now is "View Full Size".
Will that Capionator do it?
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-11-20 01:23
Ah now I know what you mean.
That is hard coded to the theme as when you click the resized image you get the full sized.
You can see the text in themes/<your theme>views/photo.html.php
Change <?= t("View full size")->for_html_attr() ?>
to <?= $item->title ?>
or not tested: <?= t("View Full size: %item_title", array("item_title" => $item->title))->for_html_attr() ?>
Posts: 27300
Same place you add the description. Edit photo.
If you want to do a bunch at a time there is the captionator module.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
No, that's not what I'm talking about.
The title attribute in the img tag of the html, <img src="picture.jpg" alt="my picture" title="this is My Picture" />, the "tool tip" that displays when you hover your mouse over the image. All that I get now is "View Full Size".
Will that Capionator do it?
Posts: 27300
Ah now I know what you mean.
That is hard coded to the theme as when you click the resized image you get the full sized.
You can see the text in themes/<your theme>views/photo.html.php
Change
<?= t("View full size")->for_html_attr() ?>
to
<?= $item->title ?>
or not tested:
<?= t("View Full size: %item_title", array("item_title" => $item->title))->for_html_attr() ?>
Now your a theme developer!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
Thank you!
I will give it a try and let you know how it turns out.