I'm trying to implement a custom button using JToolBarHelper::custom, my code is as follows:

JToolBarHelper::custom('message.resend', 'email.png', 'Resend Email', 'Resend Email', false);

The button displays fine, only issue is I can't get the icon to display with it. I've tried going off of this documentation: https://docs.joomla.org/J1.5:How_to_create_a_custom_button but it is outdated and isn't working for me. Anyone know the proper way to load in a custom icon?

1 Answer 1


The second parameter of JToolBarHelper::custom() is a CSS class name that corresponds to the icon you wish to display, not a file name. Joomla! comes with a bunch of built-in icons for you to choose from. You can find a list here: https://docs.joomla.org/J3.x:Joomla_Standard_Icomoon_Fonts Simply pick one of these and use it's name instead of the file name you are trying to use.

If you would like to use your own icon, that is possible also, you will need to put in a class name of your choice that has not already been defined (e.g. mycomp-email-icon) and then load some CSS into your component that defines that class and loads your icon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.