Notice that MaxiGallery’s templates (childgallerypicturetpl and gallerypicturetpl) don’t have the ’alt’ attribute for the img tag.
I fixed that in my copy using "[+maxigallery.picture.title:htmlent+]" place holder however I am curious if there is a better way we can control which content (title, document name or summary) for alt attribute via MaxiGallery’s parameter.
Thanks!
Hi,
how did you do that. I am interested in having an alt showing up.
Where did you put that placeholder, allway has been a strugle for me them placeholders,
thanks.
Sorry, I don’t remember exactly which file (or two files) I added the alt text, but my guess is it’s "gallerypicturetpl.html" located in the ’assets/snippets/maxigallery/templates/’.
You may want to check out the ’childgallerypicturetpl.html" file.
Below are the codes from my "gallerypicturetpl.html" file from line #1 to line #9. Look for the two placeholders in the alt attribute.
[+maxigallery.embedtype:is=`smoothgallery`:then=`
<div class="imageElement">
<h3>[+maxigallery.picture.title:htmlent+]</h3>
<p>[+maxigallery.picture.descr:htmlent+]</p>
<a href="[+maxigallery.picture_link_url+]" title="[+maxigallery.strings.click_to_zoom+]" class="open"></a>
<img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="full" alt="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]" />
<img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]" />
</div>
`+]
Hi Frank, I think hover uses title tag. If you show me your page I can take a look and compare it with mine.
Here are what I have:
image document:
[!MaxiGallery? &display=`embedded` &embedtype=`smoothgallery` &childgalleries_order_by=`createdon` &max_thumb_size=`110` &max_pic_size=`570` &order_by=`random` &keep_bigimg=`1!]
In the "Manage Picture" area, image description is entered in ’Title’, and it’s pulled from <h3>[+maxigallery.picture.title:htmlent+]</h3> in "gallerypicturetpl.html" on line #3.
In your page he title text do show up in every photo in the source code, but only the first one is showed from screen.
I see something isn’t right from your source code though, on the very top you have this:
<?xml version="1.0"?>
Will this be the culprit?
SmoothGallery doesn’t use those image tags to display the images.. It creates a div for each image and sets the image as the div background. So the alt and title attributes do not get set to the actual pictures that you see on the page.
Use Webdeveloper toolbar in Firefox and select View Source -> View Generated Source to see the html source that smoothgallery script generates.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Thanks Doze,
will check that.