CDetailView and link inside

I have this CDetailView:


$this->widget('zii.widgets.CDetailView', array(

	'data'=>$ritmo,

	'attributes'=>array(

		array(

                 'label'=>'mp3',

                  'type'=>'raw',

                  'value'=>CHtml::link($ritmo->price, 

                            $this->createUrl('playMp3',array('mp3Lnk'=>$ritmo->price)))

                ),...

But the href of the link is always #

SOLVED (Wrong link)

try this…CLinkColumn…


array(

            

        'class'=>'CLinkColumn',

        'labelExpression'=>'$data->name',

		'urlExpression'=>'Yii::app()->createUrl("/courses/exams/create",array("exam_group_id"=>$data->id,"id"=>$_REQUEST["id"]))',

        'header'=>'Name',

)

or try this





$this->widget('zii.widgets.CDetailView', array(

    'data'=>$model,

    'attributes'=>array(

        

        array(               // related city displayed as a link

            'label'=>'City',

            'type'=>'raw',

            'value'=>CHtml::link(CHtml::encode($model->city->name),

                                 array('city/view','id'=>$model->city->id)),

        ),

    ),

));




SOLVED