Hi,
Is it possible to use, say, view from ‘main application’ in a child module?
Thx
Hi,
Is it possible to use, say, view from ‘main application’ in a child module?
Thx
Try something like this:
$this->renderPartial('module_name.views.model_name.view_name', array('model'=>$model));
( substitute module_name, model_name, view_name )
GSTAR said right, anyway I’d like to advice you not to include such strange views but creating a widget and unsing in both places.
Usually if a view is needed in 2 places, can be useful even in a third (and so on). So maybe is for you better to use 5 minutes for create a widget, generize it a bit and use with $this->widget();
It is much more MVC
Thank you both GSTAR and zaccaria for your replies. While renderPartial works, it can easily create much mess and coupling. Widgets is probably the right way. I don’t think that I’ll reuse this particular one more than three times (but who knows)
Thx again