beginners problem: layout modification

Hi there,

i am new to the yii framework. I want to change the layout of the demo application and start from scratch, so i moved all files except main.php out of protected/views/layouts and stripped down main.php to the bare minimum:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <meta name="language" content="en" />

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>


</head>


<body>


<div class="container" id="page">

        <?php echo $content; ?>

</div>


</body>

</html>



but when i reload, i only get the view content (the Congratulations! You have successfully… text), without the layout part around it. What am i doing wrong?

You removed the references to the css files.

I don’t have an empty project set up at the mo, this is from the blog demo.




	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />

	<!--[if lt IE 8]>

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection" />

	<![endif]-->


	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" />

	<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />



Also, most of the styling is attatched to the elements you have removed. All that you should have left (once the style sheets are linked up) is the blue page border and the text styling

it was not only the stylesheets, but also that i removed the file column1.php, which is the actual default layout. Understand it much better now, thanx