且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Joomla! 3.1,删除引导程序

更新时间:2023-12-03 14:33:58

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

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.