乔姆拉!3.1、移除Bootstrap [英] Joomla! 3.1, Remove Bootstrap

查看:15
本文介绍了乔姆拉!3.1、移除Bootstrap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我的 Joomla 3 网站完全删除引导程序,而不是在前端显示工具提示.我几乎尝试了所有方法并且阅读了几乎所有关于该主题的文章,但找不到正确的解决方案.

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?

推荐答案

从模板和模块中删除几行是不够的.我的解决方案是创建一个插件:

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']);
        }
    }
}

它适用于 Joomla!3.2 - 3.6.

It works in Joomla! 3.2 - 3.6.

这篇关于乔姆拉!3.1、移除Bootstrap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆