Add a Module Class Suffix to Any Joomla Module

Open up your module zip file or download the module folder from your server.

In the main directory there will be a php and xml file, usually with the same name as the module.

In the xml file add the following line above the final </install> tag.

<param name="moduleclass_sfx" type="text" label="Module Class Suffix" description="A suffix to be applied to the css class of the module (table.moduletable), this allows individual module styling"></param>

 

To get "Module Class Suffix" in the parameters section.

Then to the php file add this:

$moduleclass_sfx = $params->get('moduleclass_sfx','');

 

(You will see similar lines near the top of the file, add this to them.)

The module can now use the module class sufix!