Cdetailview Value Format

I have the following piece of code:




widget('zii.widgets.CDetailView', array(

	'data'=>$model,

	'attributes'=>array(

		'name',

		'text',

	)

)); ?>



where text contains a long text. When I show it with CDetailView the text is placed in a single long line and it exceeds its container. So I would format this field in order to place the text in multiple lines.

How can I do this?

thanks

Please note that attributes are part of the attribute property of the CDetailView object. Each element can be presented as array with different properties (described in http://www.yiiframework.com/doc/api/1.1/CDetailView#attributes-detail). For example:




widget('zii.widgets.CDetailView', array(

	'data'=>$model,

	'attributes'=>array(

		'name',

		array(

                    'name'=>'text',

                    'value'=>'$data->text',

                    'type' => 'html',

             )

	)

)); ?>



Note that type can be recognized by formatter as well (see CFormatter) - predefined types are raw, text, ntext, html, date, time, datetime, boolean, number, email, image, url.