We offer outstanding professional Joomla!TM extensions.

Professional Joomla! Extensions

Professional Joomla! Extensions

Blog How can I use MooTools 1.2 in Joomla 1.5?

Newsletter

Enter your email address:



Delivered by FeedBurner

Latest on Forum

Member Login



Forum Tags


Advanced search
How can I use MooTools 1.2 in Joomla 1.5?
Tuesday, 03 February 2009 16:02
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?

Easy!

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:

unset($this->_scripts['/media/system/js/mootools.js']);
$this->_scripts = array_merge(array('/templates/mytemplate/js/mootools12.js' => 'text/javascript'), $this->_scripts);


Now you can include MooTools in your extensions as usual:

JHTML::_('behavior.mootools');

But frontend will load your 1.2 version.
 
 
Copyright © 2008-2012 Blogomunity.com
Trademarks and tradenames used herein are the property of their respective holders.
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. Blogomunity is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.