You probably want $this->_helper->viewRenderer->setRender($action), but only the one in the postDispatch() will take effect since it is always executed after the action.
-- Mon On Mon, Jun 8, 2009 at 6:12 AM, agatone <zoran.z...@gmail.com> wrote: > > I have a controller action that picks out what script is going to render. > So > I use render('scriptname.phtml') inside my action. There is scenario where > I > have to alter some view scripts and i do that inside controller's > postDispatch() method - since i want it for all actions inside that > controller. But in combination with the render() inside action, > postDispatch() gets executed when view already rendered. If i don't use > render() then postDispatch() is executed before the view rendering. > My guess is that that is kinda wrong - in a way - since actual rendereing > should allways be done at the same point of the execution flow in this case > always after postDispatch() - no matter what. > > Is there a way to only set the name of script to be rendered later? If not > then I guess I'll have to handle that on my own with some property of the > controller and have some controller plugin with postDispatch() that calls > render with that value. > > ty > -- > View this message in context: > http://www.nabble.com/Controller-flow-changes-when-using-render%28%29-inside-controller-action-tp23915931p23915931.html > Sent from the Zend Framework mailing list archive at Nabble.com. > >