0
에 나는 오류AddStyleSheet 오류가 줌라 3.0
Fatal error: Call to a member function addStyleSheet() on a non-object in /home/[hidden]/public_html/msa/templates/protostar/index.php on line 187
을 얻고있다. 나는 줌라의 3.1.5을 사용하고이 내 템플릿 코드입니다 : 내 템플릿이 기본값으로 설정되지 않았기 때문에이 오류가 원인 인 것을 발견했다
<?php defined('_JEXEC') or die('Restricted access');?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<!-- Include Joomla Header -->
<jdoc:include type="head" />
<!-- Get page title -->
<?php $article = JTable::getInstance("content"); $article->load(JRequest::getInt("id")); $pageTitle = $article->get("title"); ?>
<!-- Open Graph -->
<meta property="og:title" content="<?php echo $pageTitle; ?>"/>
<meta property="og:site_name" content=""/>
<!-- Google Analytics + Webmaster -->
<!-- CSS --->
<link rel="stylesheet" href="/templates/[hidden]/css/responsive-grid.css" media="screen, print, handheld" />
<link rel="stylesheet" href="/templates/[hidden]/css/style.css" media="screen, print, handheld" />
<?php
$document = JFactory::getDocument();
$document->addStyleSheet('templates/[hidden]/style.css');
$document->addStyleSheet(JUri::base().'templates/[hidden]/css/style.css');
JHtml::stylesheet('templates/[hidden]/css/style.css');
?>