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
$this->beginWidget('zii.widgets.CPortlet', array(
'title'=>"Agent List",
));
?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'agent-new-grid',
'itemsCssClass'=>'table table-hover',
'dataProvider'=>$model->search(),
'template'=>"{items}",
'filter'=>$model,
'columns'=>array(
'id',
'name',
'propName',
'logo', //returns image path along with name.
'address',
array(
'class'=>'CButtonColumn',
),
),
)); ?>
<?php $this->endWidget();?>
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
$this->beginWidget('zii.widgets.CPortlet', array(
'title'=>"Agent List",
));
?>
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'agent-new-grid',
'itemsCssClass'=>'table table-hover',
'dataProvider'=>$model->search(),
'template'=>"{items}",
'filter'=>$model,
'columns'=>array(
'id',
'name',
'propName',
'logo', //returns image path along with name.
'address',
array(
'class'=>'CButtonColumn',
),
),
)); ?>
<?php $this->endWidget();?>