Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Joomla! 3.1, Remove Bootstrap

I want to completely remove bootstrap from my Joomla 3 website, not to display tool-tips on the front-end. I tried almost everything and have read almost every article on the topic but cannot find the correct solution.

The fact is that it is not so hard to remove it but I want to remove it permanently so that no update can undo my changes.

Is there a way to complete this task?

like image 245
gag Avatar asked Feb 16 '23 02:02

gag


1 Answers

It is not enough to remove from template and modules few lines. My solution is to create a plugin:

class plgSystemYourPlugin extends JPlugin
{
    public function onBeforeCompileHead()
    {
        // Application Object
        $app = JFactory::getApplication();

        // Frontend
        if( $app instanceof JApplicationSite )
        {
            $doc            = JFactory::getDocument();
            // Remove default bootstrap
            unset($doc->_scripts[JURI::root(true).'/media/jui/js/bootstrap.min.js']);
        }
    }
}

It works in Joomla! 3.2 - 3.6.

like image 184
Jacek Labuda Avatar answered Feb 19 '23 10:02

Jacek Labuda