How can I use MooTools 1.2 in Joomla 1.5?

Even recent Joomla 1.5.x uses MooTools 1.1 which is old and incompatible with some modern MooTools-based scripts. I hope Joomla 1.6 will use MooTools 1.2 – but right now we are forced to use the old version.

How can we use the new MooTools 1.2 series and core Joomla MooTools loader JHTML::_(‘behavior.mootools’) without patching core files?


Save the MooTools 1.2 series .js file somewhere in your template, i.e. /templates/mytemplate/js/mootools12.js and add following files at the top of your template’s index.php:

$this->_scripts = array_merge(array('/templates/mytemplate/js/mootools12.js' => 'text/javascript'), $doc->_scripts);

Now you can include MooTools in your extensions as usual:


But frontend will load your 1.2 version.


Related Articles