How to rid core or theme bootstrap files
Without messing with librarieson Thursday 24 October 2019
If you need to use your own bootstrap version and core or theme bootstrap files are still loaded, you can override them with theme_library.php file.
More information is in this issue: https://github.com/e107inc/e107/issues/1725
But I would use this only for changing jquery version nothing more. Too complicated in my opinion.
The easy and simple way is:
- check theme.xml file and look for element libraries. Delete it. It looks like this. This is way how e107 loads bootstrap itself without theme.php control.
<libraries> <library name="bootstrap" version="3" scope="all"/> <library name="fontawesome" scope="all"/> </libraries>
- check theme.php and look for e107::library() and delete it. This is way how your theme loads bootstrap files from library.
e107::library('load', 'bootstrap'); e107::library('load', 'fontawesome');
Then you can add your own files simply with e107::css() and e107::js()
For example, Hestia is using customized bootstrap, so it is loaded from the local folder. With CDN just use a parameter for an external source.
e107::css("theme", "assets/css/bootstrap.css"); e107::css("theme", "assets/css/hestia.css");