I’m using default joomla mod_banner.
I’d like to modify the module so can give specific css class for each banner image, so if the module displaying 3 banner images, the first banner (image) will have class="banner1", the second image will have class="banner2" the third image will have class="banner3" and so on.
How can I do that?
I’m using default joomla mod_banner . I’d like to modify the module so can
Share
If you decide to modify your
mod_bannersmodule, then just follow the steps:/modulesfrom your root directory.mod_bannersinmodules/mod_bannersmodules/mod_banners/tmpldefault.phpis the file that display the images into the frontend of you joomla website.just edit this file. See the
imgtag into and just change whatever name you want to give the class..UPDATE : Take a look on the given Codes:
now just find out the
<imgtag and just add a class something likeand at the end of the file findout the
endforeach;and just add the code something likeproviding you the class name like
banner-1, banner-2, ....etc.IMPORTANT: If you notice on the top most of your
default.phpthe module provide the images into an array, If you are familiar with the Joomla modules structures then you can modify it easily.