Hi,
I want to load my javascript elsewhere in my template using yepnope.
I tried emptying the array in conf.inc.php but that doesn't work.
how do i disable loading all libraries in my template?
thanks,
anton
Disable the javascript library autoload
- Oliver Georgi
- Site Admin
- Posts: 9907
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Re: Disable the javascript library autoload
There are some frontend functionalities needing javascript related stuff. But you can overwrite the related call whenever you like.
Check the related frontend functions in include/in_front/js.inc.php. There is a var $block['jslib'] which can be filled using frontend_init. Then create your own js.mylib.inc.php inside include/in_front/lib — maybe take js.mootools-1.1.inc.php as sample what has to be defined for lightbox effects or plugin functionalities.
It is easy.
But really. Why conditional loader if you know what you need. The cms has some kind of conditional loader with much more flexibility. Check the template replacers which can be used anytime and anywhere:
<!-- CSS: … --> and <!-- JS: … -->
Check the related frontend functions in include/in_front/js.inc.php. There is a var $block['jslib'] which can be filled using frontend_init. Then create your own js.mylib.inc.php inside include/in_front/lib — maybe take js.mootools-1.1.inc.php as sample what has to be defined for lightbox effects or plugin functionalities.
It is easy.
But really. Why conditional loader if you know what you need. The cms has some kind of conditional loader with much more flexibility. Check the template replacers which can be used anytime and anywhere:
<!-- CSS: … --> and <!-- JS: … -->
Re: Disable the javascript library autoload
Thanks Oliver.
I'm using conditional loaders because I have js dependencies and therefore need to guarantee load order.Oliver Georgi wrote:But really. Why conditional loader if you know what you need. The cms has some kind of conditional loader with much more flexibility. Check the template replacers which can be used anytime and anywhere:
<!-- CSS: … --> and <!-- JS: … -->