One page two controllers

I have two model objects (Product and ProductItem) and associated controllers, views & etc. (generated using yiic). Products contain 0…n ProductItems.

I want to have a single view for editing the two model objects but I'm not too sure how to do that. I have the _form view file for Product and I can put a list of existing ProductItems in that (findAll query) but I also need be able to create new ProductItems.

So, can I get a reference to the ProductItem controller and render the ProductItem form into the Product form or is there some other way I should do that.

thanks,

Check this:

http://www.yiiframew…oc/cookbook/19/

Hope it helps you!

good question, this is quite common task in many apps.

Quote

Check this:

http://www.yiiframew…oc/cookbook/19/

Hope it helps you!

It does. Thanks,  I thought it might be a FAQ and easily answered (I'm very new to Yii).