Page 1 of 1

Mootools not getting included in head under custom component

Posted: Sun Feb 03, 2008 11:39 pm
by Skippdog
What determines whether or not mootools gets included or not? I poked around in the database, checked parameters and such, but can't determine how Joomla determines whether to include mootools or not on the page.

Any help?

Re: Mootools not getting included in head under custom component

Posted: Mon Feb 04, 2008 2:10 am
by CirTap
Hi,

it's generated by JHTMLBehavior::mootools(), called by JHTML::script( .., $mootools=true), whenever a "pane" is needed or a "tooltip" (front-end editing) and it's determined by a component, module, plugin (i.e. Legacy Plugin), and technically even by a template.
It can't be configured: if it's needed, it's loaded. To get rid of it in the front-end you need to remove it from the document object. If you search the forum you should find several posts explaining how it can be done.

To add mootols, call
  JHTML::_('behavior.mootools');

Did that answer your question? :)

Have fun,
CirTap

Re: Mootools not getting included in head under custom component

Posted: Mon Feb 04, 2008 2:39 am
by Skippdog
Yup, that covered it!

I didn't realize that you had to request mootools be included via the code. Added that line and I'm off to the races.

Cheers!