Mootools not getting included in head under custom component

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
Skippdog
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jan 11, 2008 4:49 pm

Mootools not getting included in head under custom component

Post by Skippdog » Sun Feb 03, 2008 11:39 pm

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?

User avatar
CirTap
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Mon Dec 12, 2005 5:34 pm
Contact:

Re: Mootools not getting included in head under custom component

Post by CirTap » Mon Feb 04, 2008 2:10 am

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
You can have programs written fast, well, and cheap, but you only get to pick 2 ...

"I love deadlines. I like the whooshing sound they make as they fly by." Douglas Adams

Skippdog
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jan 11, 2008 4:49 pm

Re: Mootools not getting included in head under custom component

Post by Skippdog » Mon Feb 04, 2008 2:39 am

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!


Post Reply