Joomla! 3.1, Remove Bootstrap

2020-04-08 06:29发布

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?

2条回答
神经病院院长
2楼-- · 2020-04-08 07:25

You can override jquery and/or bootstrap in your template. While not ideal, this solution worked for me: http://osdir.com/ml/joomla-development/2012-12/msg00475.html

查看更多
\"骚年 ilove
3楼-- · 2020-04-08 07:29

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.

查看更多
登录 后发表回答