A
A
AleDv2015-03-21 15:13:37
Yii
AleDv, 2015-03-21 15:13:37

How to send multiple models to CListView (Yii 1)?

Hello. I have several models and they need to be displayed in one CListView. How can I do that?
Data output of one model:

$this->widget('zii.widgets.CListView', array(
  'dataProvider'=>$dataProvider,
  'itemView'=>'_view',
));

PS I'm just versed in Yii, so I don't know all the subtleties.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yago, 2015-03-22
@Yago

When getting $dataprovider, you can set specific filter conditions in criteria
www.yiiframework.com/doc/api/1.1/CDbCriteria
www.yiiframework.com/doc/api/1.1/CActiveDataProvider

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question