Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

List Inside Cdetailview

$
0
0
Hello, does anybody knows how to add a list inside CDetailView extension?
My model relations:
public function relations()
	{return array('publishers' => array(self::MANY_MANY, 'Publisher', 'bookpublisher(book_id, publisher_id)'))},


How can i include list of "publishers" in CDetailView?
$this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
           'title',
            array('name'=>'Publishers','value'=>$model->publishers),
	),

Code above will return an error "htmlspecialchars() expects parameter 1 to be string, array given"
Any thoughts on what would be the proper way of achieving this?
Thank you.

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>