【问题标题】:Joomla! Unset CSS in template index.phpJoomla!在模板 index.php 中取消设置 CSS
【发布时间】:2013-10-16 21:23:19
【问题描述】:

我有一个自定义的 Joomla 3 模板供我使用

unset($this->_scripts[JURI::root(true).'/media/jui/js/bootstrap.min.js']);

取消设置引导功能。这对我来说可以。现在我想使用相同的技术来取消设置一个 css 文件并为其设置另一个。

unset($this->_scripts[JURI::root(true).'/media/system/css/calendar-jos.css']);

它没有给我任何结果。

我该如何解决这个问题?

谢谢。

【问题讨论】:

  • 样式表不会在 _scripts 数组中,但可能有一个名称 _styles_stylesheets

标签: php css joomla


【解决方案1】:

变化:

unset($this->_scripts

到:

unset($this->_styleSheets

【讨论】:

  • 感谢您的回答,但这没有任何影响。我把 unset($doc->styleSheets[JURI::root(true).'/media/system/css/calendar-jos.css']);并且还尝试了 unset($doc->_styles[JURI::root(true).'/media/system/css/calendar-jos.css']);但css仍然存在
  • unset($this->_styleSheets[JURI::root(true).'/media/system/css/calendar-jos.css']);
猜你喜欢
  • 1970-01-01
  • 2015-11-14
  • 1970-01-01
  • 2011-01-29
  • 2013-07-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多