I am trying to disable autorendering under certain conditions in a plugin
preDispatch() method. I thought this would work:
Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')->setNoRender();
And this code is executing when I expect it to. But when a controller action
is invoked for which autorendering should be turned off, I am still getting
a "script foo/bar.phtml not found in path" exception. I tried
getStaticHelper(), same result. I have read the relevant docs but frankly I
don't really get it.
I _can_ disable autorender in fooController's init() or within barAction()
by accessing the helper broker as $_helper. But I am trying to do it this
way because it seems more DRY.
btw, I also notice that the setNoRender() line in the plugin executes not
once but twice. This is in an Ajax call and I can't see any reason why this
should happen -- there's no reiteration of the dispatch loop AFAIK.
Any suggestions? Thanks.
--
David Mintz
http://davidmintz.org/
The subtle source is clear and bright
The tributary streams flow through the darkness