YII - CDetailView: link to another page -
in cdetailview, how link give value page? have book member of book category, e.g. science fiction. book details page displays following data:
book title: dune author: frank herbert category: science fiction --> link
science fiction should link /category/view
, in following code, doesn't work me:
array( 'label' => 'category', 'value' => $model->category->name, 'urlexpression'=>'yii::app()->createurl("category/view", array("cid"=>$data->category_id))', 'class'=>'clinkcolumn', ),
i'm getting impression urlexpression not work cdetailview. property of class clinkcolumn (» cgridcolumn » ccomponent), i'm on wrong track here. proper way handle this?
$this->widget('cdetailview', array( 'data'=>$model, 'attributes'=>array( 'title', 'author', array( 'name'=>'category', 'type'=>'raw', 'value'=>chtml::link('link title', 'url'), ), ...
Comments
Post a Comment