-- Aspra Flavius Adrian <[email protected]> wrote
(on Sunday, 08 February 2009, 01:45 PM +0100):
> Hi. How could I trigger another /module/controller/action in order to
> catch its output which should then be displayed inside a dojo
> container?
>
> Imagine the /default/index/index rendering the "homepage", which
> should contain several blocks like "the latest forum entries" (from
> /forum/index/latest) and "best wiki articles" (from /wiki/index/best).
If you're indeed using Dojo, consider using ContentPane's with the
"href" attribute pointing to actions that have the content you wish to
display. That approach will require more requests, but be very dynamic.
The other possibility is to use one of the following:
* partial() view helper allows you to specify the module in which to
look for the view script.
* action() view helper dispatches another action and returns the
content
* ActionStack action helper/plugin will allow you to specify one or
more actions to perform during the request lifecycle. Have each
render to a distinct response segment, and build the final output in
your layout script.
In terms of performance, ActionStack will be faster than partial(), which
will in turn be faster than action(). However, partial() and action()
allow you to build the view within a single action view script, while
ActionStack will require a different strategy.
--
Matthew Weier O'Phinney
Software Architect | [email protected]
Zend Framework | http://framework.zend.com/