I can show image in the details view reading this here in Yii topic. Now, I want to add width and alt tag into img tag. Is it possible?
I wrote as follows:
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'htmlOptions'=>array('class'=>'table table-striped responsive-table'),
'attributes'=>array(
'id',
'code',
'name',
'description',
array(
'type'=>'raw',
'width'=>'200',
'alt'=>'hi images',
'value'=> CHtml::image(Yii::app()->request->baseUrl.'/images/products/'.$model->image),
),
'price',
),
));
Thanks in advance.