I have 2 modules (1 controller in it) in application in zend framework 2: - news (with add, edit, get, list, and delete, .... shortList actions) - application (with a few actions)
in news/get I would like to use outcome from shortList action (complete view) as well as in one of application module/controller.
more likely layout is not good place to do it - only 2 actions will reuse shortList content. It seems like partial view or child view, however across modules.
How I should attempt to do it ?
you have 2 options:
forward
to the other action and get its view model and add pass it to your current view as a var http://framework.zend.com/manual/current/en/modules/zend.mvc.plugins.html#zend-mvc-controller-plugins-forward