Modules using common layout not showing images [RESOLVED]


I’m using modules in my project and I have set it up to use a common layout found in



The page is rendered with the layout, however the images used by the layout are missing. The images are in


Here’s how i set up the controller in my module:


class DefaultController extends CController


	public $layout="//layouts/main";

	public function actionIndex()





Here’s a small snippet from the layout file trying to render an image:


<?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. :)

Nevermind, i figured it out.





. Hope this would be helpful to others. :D


Yii::app()->baseUrl . '/images/logo.png'

might be even better. It makes your application fully portable.

got that. thanks!