Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

JS Conflict with Joomla internal bootstrap.min.js #54

Closed
acheloos-m opened this issue Jan 3, 2014 · 3 comments
Closed

JS Conflict with Joomla internal bootstrap.min.js #54

acheloos-m opened this issue Jan 3, 2014 · 3 comments

Comments

@acheloos-m
Copy link

Hi,
the joomla backend operates with a custom version of bootstrap.min.js used for the backend menues etc. The file is located at /media/jui/js/bootstrap.min.js and gets autoloaded in the frontend template. This results in a strange behaviour. We can't delete this file, because then backend menus etc. will stop working, but there should be an option to switch it off in the frontend. Adding the filename to 'disable js' parameter won't work, because then it also disabled the templates bootstrap.min.js file.

Any Ideas maybe by unsetting some paramter in logic.php manually?

Cheers

@pepperstreet
Copy link

Good point. A general problem with most template frameworks and the way J! implemented bootstrap.

You may have a look into the Joomlart T3 framework. I remember, they check for bootstrap and joomla version, and switch/remove J! core bootstrap files with their own files from T3 folders. Not sure if this is a good solution, because it is "hardcoded" and not implemented as a template parameter/toggle.

@MHey @Bloggerschmidt
Please, have a look into *_template.php in T3 system plugin. See functions addHead() and *_updateHead()
.../plugin/plg_system_t3.vX.X.X/includes/core/template.php

Maybe helpful.

@acheloos-m
Copy link
Author

Checked this, but it won't work here. I've just debugged it. At the very end of template loading the jui/bootstrap file isn't set, neither in $doc->_scripts nor in $headdata['scripts'] , so you can't eliminate it the way it's did in the T3 plugin. Seems like it's added elsewhere?

But i found a simple workaround:
You're able to overide the file in /media/jui/ by adding a juifolder to $template/js/. Then simply by adding a empty file called bootstrap.min.js you can use your very own js files as defined in logic.php.

@schmidt1024
Copy link
Owner

The way bootstrap is implemented in joomla is not the best way. A clean way is to write overrides, e.g. for mod_breadcrumbs and comment out the bootstrap framework like //JHtml::_('bootstrap.tooltip');.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants