Hi,
I’m using modules in my project and I have set it up to use a common layout found in
ProjectName/protected/views/layout/main.php
.
The page is rendered with the layout, however the images used by the layout are missing. The images are in
ProjectName/images/
Here’s how i set up the controller in my module:
"ProjectName/protected/modules/ModuleName/controllers/DefaultController.php"
class DefaultController extends CController
{
public $layout="//layouts/main";
public function actionIndex()
{
$this->render('index');
}
}
Here’s a small snippet from the layout file trying to render an image:
"ProjectName/protected/views/layouts/main.php"
<?php echo CHtml::image('//images/logo.png','',array('style'=>'width:1.5em; height:1.5em'))?>
Did i do it correctly?
A little help for a newbie please.