Ismael
(Shalanga)
August 28, 2009, 8:40pm
1
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!
pestaa
(Pestaa)
August 28, 2009, 8:45pm
2
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.
Ismael
(Shalanga)
August 28, 2009, 8:53pm
3
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’)
pestaa
(Pestaa)
August 28, 2009, 9:06pm
4
Yes, you can include other views. Make sure your path is relative to the caller view’s location.
Ismael
(Shalanga)
August 28, 2009, 10:36pm
5
Thank you, this is new to me.
I think this will solve my problem.