Joomla! 3.1,删除引导程序 [英] Joomla! 3.1, Remove Bootstrap

查看:137
本文介绍了Joomla! 3.1,删除引导程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从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.

这篇关于Joomla! 3.1,删除引导程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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