Skip to content

Instantly share code, notes, and snippets.

@phproberto
Last active December 10, 2015 21:58
Show Gist options
  • Save phproberto/4498465 to your computer and use it in GitHub Desktop.
Save phproberto/4498465 to your computer and use it in GitHub Desktop.
Joomla! overridable media cheatsheet

Joomla! overridable media cheatsheet

This document includes fast examples to use @mbabker's method to use the media folder to allow stylesheets and javascript overrides:

I have also added the method to use overridable images in the media folder.

Images

JHtml::image('mod_transformer/printer.png', JText::_('JGLOBAL_PRINT'), null, true, false);

Checks in this order:

/templates/MY_TEMPLATE/images/mod_transformer/printer.png  
/media/mod_transformer/images/printer.png  

Function definition

Stylesheets

JHtml::stylesheet('mod_transformer/transformer.css', false, true, false);

Checks in this order:

/templates/MY_TEMPLATE/css/mod_transformer/transformer.css  
/media/mod_transformer/css/transformer.css  

Function definition

Javascript

JHtml::script('mod_transformer/transformer.js', false, true);;

Checks in this order:

/templates/MY_TEMPLATE/js/mod_transformer/transformer.js  
/media/mod_transformer/js/transformer.js  

Function definition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment