How can I get CStarRating into CDetailView? I have tried a lot and I am successful with CGridView.
Using the following code, I get an error: "Undefined variable: data"
View:
<?php
$this->widget('zii.widgets.CDetailView', array(
'data' => $model,
'attributes' => array(
'id',
'name',
array(
'name' => 'quality',
'type' => 'raw',
'value' => $this->widget(
'CStarRating', array('name' => $data->name,
'id' => $data->id,
'value' => $data->quality,
'readOnly' => true), true
),
),
),
));
?>
What must I do?
Regards
Jannis