Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Joomla 3.3未设置CSS_Php_Css_Joomla_Joomla3.0 - Fatal编程技术网

Php Joomla 3.3未设置CSS

Php Joomla 3.3未设置CSS,php,css,joomla,joomla3.0,Php,Css,Joomla,Joomla3.0,我无法取消设置css样式。以下是我尝试过的: $BaseURL = $this->baseurl; unset($this->_styleSheets[$BaseURL.'/media/com_namewithheld/css/style.css']); unset($this->_styleSheets[JURI::root(true).'/media/com_namewithheld/css/style.css']); 两者都不起作用,我甚至尝试使用整个网站的url?出了

我无法取消设置css样式。以下是我尝试过的:

$BaseURL = $this->baseurl;
unset($this->_styleSheets[$BaseURL.'/media/com_namewithheld/css/style.css']);
unset($this->_styleSheets[JURI::root(true).'/media/com_namewithheld/css/style.css']);

两者都不起作用,我甚至尝试使用整个网站的url?出了什么问题?所有其他未设置项都可以正常工作。

如果是Joomla media文件夹,您可能不需要模板部分“com\u/

一些组件强制添加样式表和Java脚本,而unset无法通过模板工作

我知道的最好的方法是:

a) 注释掉代码:

b) 使用插件:这是我推荐的用法


另外,如果您决定访问您的站点,缓存版本将忽略您的模板覆盖并添加您的文件,因此我建议使用插件方法。

两个问题:您使用的Joomla的确切版本是什么?你把这段代码放在哪里?把这段代码放在一个系统插件中,然后对插件进行排序,这样你的插件就是最后一个了。@RiccardoZorn我不想写一个单独的插件来取消设置,这似乎有点过分了。
$BaseURL = $this->baseurl;
unset($this->_styleSheets[$BaseURL.'/media/css/style.css']);
unset($this->_styleSheets[JURI::root(true).'/media/css/style.css']);