I’m quite new to Yii and I’m trying to get a view where I combine several views in one… I have 6 different models I want to show on one page, it works well when I use the CGridView but I need a CDetailView of one of the models but somehow I don’t know how to declare a model. I generated the models, controllers, views with gii so I have the respective files (models: Model1.php, Model2.php…, controllers: Model1Controller.php,…, views…). If I for example want to have the detail view of Model1 and adjust the view of that model accordingly then I have no problem. If I make a new file newView.php and put some code in there I don#t get a model…
I hope that was somehow clear and there is somebody who can help me.
@GDzyne I was trying the renderPartial() function but since I didn’t know (still don’t) how to pass a model into the parent view (I guess this was what I meant with declaring a model) it didn’t work. The code looked like that: