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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -