Howto add custom alt and title text in Joomla mod_banners

Unfortunately by default mod_banners in Joomla is using the banner name as alt text and there is no title text at all. It’s quite easy to set this up though.

Firstly you need to edit your helper.php file located at modules/mod_banners directory.

Open the file and find this line:

$image  = ‘imageurl.'” alt=”‘.JText::_(‘Banner’).'” />’;

Now replace it with this:

$image  = ‘imageurl.'” alt=”‘.$item->description.'” title=”‘.$item->tags.'” />’;

Once this is done you can add the desired alt text within the banner description area and title using the meta tags area.

Good luck!

Leave a Reply