Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.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 1.5自定义移动框架不加载css_Php_Html_Css_Joomla_Migration - Fatal编程技术网

Php joomla 1.5自定义移动框架不加载css

Php joomla 1.5自定义移动框架不加载css,php,html,css,joomla,migration,Php,Html,Css,Joomla,Migration,大家好,我的任务是将一个自定义框架从joomla 1.5移动到3.0,我已经获得了可以完美加载主页的框架,但是当我转到其他页面时,css不会加载以下代码: PHP: 假设这在模板的index.php文件中,然后尝试: $doc = JFactory::getDocument(); $doc->addStyleSheet($this->baseurl.'/templates/'.$this->template . '/css/NAMEOFSTYLESHEET.css', $typ

大家好,我的任务是将一个自定义框架从joomla 1.5移动到3.0,我已经获得了可以完美加载主页的框架,但是当我转到其他页面时,css不会加载以下代码:

PHP:


假设这在模板的index.php文件中,然后尝试:

$doc = JFactory::getDocument();
$doc->addStyleSheet($this->baseurl.'/templates/'.$this->template . '/css/NAMEOFSTYLESHEET.css', $type = 'text/css', $media = 'screen,projection');
改为添加样式表

我猜
$this->baseurl()
不适用于
()
,因为它是一个参数,而不是一个函数。因此,显示的链接中没有baseurl,它是由一个相对链接生成的,该链接还考虑了joomla设置的基本href。这意味着当你不在网站的根目录下时,它的链接是错误的

(如果您删除了所有()的话,您的代码可能会工作,但是addStyleSheet方法更好)

如果这不起作用,你能看看你的主页上生成的URL是否与你说的有效,子页面上生成的URL是否不同,然后将这些附加信息添加到你的问题中

<link rel="stylesheet" href="http://flyvail/index.php/templates/system/css/system.css" type="text/css" />

<link rel="stylesheet" href="http://flyvail/index.php/templates/system/css/general.css" type="text/css" />

<link rel="stylesheet" href="http://flyvail/index.php/templates/FlyVail2/css/addons.css" type="text/css" />

<link rel="stylesheet" href="http://flyvail/index.php/templates/FlyVail2/css/layout.css" type="text/css" />

<link rel="stylesheet" href="http://flyvail/index.php/templates/FlyVail2/css/template.css" type="text/css" />

<link rel="stylesheet" href="http://flyvail/index.php/templates/FlyVail2/css/typo.css" type="text/css" />



<!-- CSS for handheld devices -->

<link rel="stylesheet" href="http://flyvail/index.php/templates/FlyVail2/css/handheld/layout.css" type="text/css" />

<link rel="stylesheet" href="http://flyvail/index.php/templates/FlyVail2/css/handheld/template.css" type="text/css" />


<!-- CSS for handheld devices -->

<link rel="stylesheet" href="<?php echo $this->templateurl(); ?>/css/handheld/layout.css" type="text/css" />

<link rel="stylesheet" href="<?php echo $this->templateurl(); ?>/css/handheld/template.css" type="text/css" />

<!-- //CSS for handheld devices -->
$doc = JFactory::getDocument();
$doc->addStyleSheet($this->baseurl.'/templates/'.$this->template . '/css/NAMEOFSTYLESHEET.css', $type = 'text/css', $media = 'screen,projection');