CDetailView with colspan

Hi Yii community! :)

I have a model named Course with attributes like name, description, duration…

I am using CDetailView for showing a single course, and I have all almost set up, but I would like to have the course name in two columns (colspan=2), without a label, but I don’t know how to do it. Here’s the code:




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

               'data'=>$model,

			'cssFile' => Yii::app()->baseUrl .'/css/course.css',

			'attributes'=>array(

				array(

					'label'=>'',

					'name'=>'name',

					'cssClass'=>'course_title',

				),

				array(

					'label'=>'Destinated',

					'type'=>'html',

					'value'=>$courseDetail['destinated'],

				),

				array(

					'label'=>'Description',

					'type'=>'html',

					'value'=>$courseDetail['description'],

				),

				array(

					'label'=>'Content',

					'type'=>'html',

					'value'=>$courseDetail['content'],

				),

			),						

		)); ?>

Thanks in advance!

anybody got solution for this?

Dear Friend

We can declare template for individual attribute.




array(

		

    'name'=>'name',

    'template'=>"<tr class=\"{class}\"><th colspan=2 style=\"text-align:center;\">{value}</th></tr>\n",

	//I have put the value inside the element 'th' as it is title of the view.			

),



Regards.