How can I give custom title at ‘cat.cat_name’?It is form a related table.
Also how not to show the html tags at values of fields?
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array('cat'=>array(self::BELONGS_TO, 'cats','cat_id' ));
}
.....
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'cat.cat_name',
.....
),
));
and in the model you have the attributeLabels assigned to the fields so that the column header will be the attributeLabel you set for the field cat_id.