Render Image In Cgridview

Hello,

I store imagename with path in db. Now i want to redenr image in listing page but it shows image name. Below is the code to generate list. Pl help.

<?php

	&#036;this-&gt;beginWidget('zii.widgets.CPortlet', array(


		'title'=&gt;&quot;Agent List&quot;,


	));


	


?&gt;

<?php $this->widget(‘zii.widgets.grid.CGridView’, array(

'id'=&gt;'agent-new-grid',


'itemsCssClass'=&gt;'table table-hover',	


'dataProvider'=&gt;&#036;model-&gt;search(),


'template'=&gt;&quot;{items}&quot;,


'filter'=&gt;&#036;model,


'columns'=&gt;array(


	'id',


	'name',


	'propName',


	'logo', //returns image path along with name.


	'address',		


	array(


		'class'=&gt;'CButtonColumn',


	),


),

)); ?>

<?php $this->endWidget();?>

Hi All,

After going through various topics in forum. i modified the above code to:

<?php $this->widget(‘zii.widgets.grid.CGridView’, array(

	'id'=&gt;'agent-new-grid',


	'itemsCssClass'=&gt;'table table-hover',	


	'dataProvider'=&gt;&#036;model-&gt;search(),


	'template'=&gt;&quot;{items}&quot;,


	'filter'=&gt;&#036;model,


	'columns'=&gt;array(


		'id',


		'name',


		'propName',


		array(


			'name'=&gt;'logo',


			'type'=&gt;'image',


			'value'=&gt;&#036;_SERVER['HTTP_HOST'].Yii::app()-&gt;request-&gt;baseUrl.'&quot;/images/agents/&quot;'.&#036;model-&gt;id.'&quot;_&quot;'.&#036;model-&gt;logo,


		),


		'address',


		'active',		


		array(


			'class'=&gt;'CButtonColumn',


		),


	),


)); ?&gt;

Now it returns me empty img tag as <img alt="" src="" >

And like this?


array(

    'name' => 'logo',

    'type' => 'image',

    'value' => "$_SERVER['HTTP_HOST'] . Yii::app()->request->baseUrl . '/images/agents/' . $data->id . '_' . $data->logo",

),

More info: http://www.yiiframework.com/doc/api/1.1/CDataColumn#value-detail

array(

        'name'=&gt;'hotel_image1',


        'type'=&gt;'html',


        'value'=&gt;'CHtml::image(Yii::app()-&gt;baseUrl . &quot;/images/hotel/&quot; . &#036;data-&gt;hotel_image1,&#036;data-&gt;hotel_name,array(&quot;class&quot; =&gt; &quot;logo&quot;, &quot;title&quot; =&gt; &#036;data-&gt;hotel_name, &quot;width&quot;=&gt;&quot;100&quot;, &quot;height&quot;=&gt;&quot;80&quot;))',


        'htmlOptions' =&gt; array(


             'style' =&gt; 'margin:2px 5px 2px 5px; width:100px;',


                     ),


    ),