How Do I Add A Image/ Icon In Menu In Admin Or View Pages


I want to add an image/icon in menu in admin or view or create pages . My code is not working…

	'<img src="'.Yii::app()->request->baseUrl.'/images/create_a.png"> ',

Please help me out

'<img src="'.Yii::app()->baseUrl.'/images/create_a.png"> ',

Create url with app baseUrl not with request baseurl.

It is not working somehow. It’s showing Error

<img src="/erp/images/create_a.png">

I don’t see anything wrong with the tag, other than it not being closed (if you’re using XHTML). Are you sure the image exists at that location from your web root?

Thanks for you reply. I am sure that image is exists :::

When I use

'<img src="http://localhost/erp/images/create_a.png"> ',

Then it is working


'<img src="'.Yii::app()->baseUrl.'/images/create_a.png"> ',

is not working…

please help

Can you show the surrounding code?


	'Recieve Stock'=>array('admin'),

	'<img src="'.Yii::app()->baseUrl.'/images/create_a.png">Manage',




	array('label'=>'<img src="'.Yii::app()->baseUrl.'/images/create_a.png"> Create Recieve Stock', 'url'=>array('create')),


Please have a look … this is not working

And which file does that code appear in?

Also, check your spelling on “Receive”. ;)

in /protected/view/admin.php file.

apologies for spelling…