Hi,
I have my SiteController like this: -
<?php
class SiteController extends Controller {
public function actionIndex() {
$this->render("hello");
}
public function actionError() {
echo("Hello Error!");
}
}
?>
And I also have my views layout in "views/site/main.php": -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo CHtml::encode($this->pageTitle); ?></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="menu">
<a href="#">Log in</a>
</div>
<div id="submenu">
<a href="#">Clients</a>
</div>
<div id="content">
<div id="left">
<?php echo $content; ?>
</div>
<div id="right">
<p>Sidebar</p>
</div>
</div>
</body>
</html>
And only the controller action is showing up but not the layout. Any ideas anyone?