Cstarrating In Cdetailview

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

Try bellow




...

            'value' => "\$this->widget(

                    'CStarRating', array('name' => $data->name,

                'id' => $data->id,

                'value' => $data->quality,

                'readOnly' => true), true

            )",

...



Didn’t help. Still the error: “Undefined variable: data”.

How can I put Cstarrating Into Cdetailview?