Render an action in some other controller

How do i do this?

I searched the forum and read the API. Couldn’t find anything.

I just want to re-use a _form.php in /modules/admin/mycontroller/etc in the website. Because it has thousand of fields and users can change they own form.

Guide me ohh Yii users!

I think files should not be shared across modules. If there is even file that is shared among controllers, they should be in the same module.

You can access all views by calling $this->renderPartial in them.

Yes I know.

I would like a better solution than copy and paste a entire controller and views to another Module.

$this->renderPartial() can render a view outside his own controller?

something like $this->renderPartial(’/otherModule/otherController/view/_file’)

Yes, you can include other views. Make sure your path is relative to the caller view’s location.

Thank you, this is new to me.

I think this will solve my problem.