Duplicate ALT in image gallery

More
7 years 6 months ago - 7 years 6 months ago #67631 by lipatovroman
Hi!
When we don't use ALT in image gallery field



all images have same ALT = Item Title.

It's bad for Google.

Yes, we can fill all ALT's for each image, but what if each item have 15-20 images?

I have edited file /plugins/flexicontent_fields/image/image.php

I added
Code:
$counter++;
at line 1959,

and added this counter to this code
Code:
case 'display': default: $img_legend = '<img src="'.JURI::root(true).'/'.$src.'" alt="'.$alt.' - image '.$counter.'"'.$legend.' class="'.$class.'" itemprop="image"/>'; $img_nolegend = '<img src="'.JURI::root(true).'/'.$src.'" alt="'.$alt.' - image '.$counter.'" class="'.$class.'" itemprop="image"/>'; break; }

So, now images have different ATL's, like this:

BMW Sedan image 1
BMW Sedan image 2
BMW Sedan image 3

I know, that image field does not have template for replacing, so this changes will lost after update.

So, I think we should have one more parameters for automatic ALT:

Use Item title? Yes/No
Add Prefix
Add Suffix
Add Counter Yes/No
Counter Before/After

Thanks.
Last edit: 7 years 6 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago - 7 years 6 months ago #67636 by ggppdk
Hello

added what you suggest without parameters
Code:
$alt_image_prefix. ' ' . JText::_('FLEXI_IMAGE') . ' ' . ($n+1);

There has been work to move rendering in layout files
but can not do this now (v3.2.0) as explained in other answer ...


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 7 years 6 months ago by ggppdk.
The following user(s) said Thank You: lipatovroman

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #67639 by lipatovroman
Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.364 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline