-- Philip G <[EMAIL PROTECTED]> wrote
(on Wednesday, 19 September 2007, 03:36 PM -0500):
> On 9/19/07, Joó Ádám <[EMAIL PROTECTED]> wrote:
> On 9/19/07, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
> > You've got the order wrong. At dispatchLoopShutdown(), the action has
> > already been performed, and the template already rendered -- the way you
> > have it now, you're assigning variables to the view object, but then not
> > rendering anything afterwards (index/index.phtml was rendered *before*
> > this plugin action was ever invoked).
> >
> > Make the plugin operate at either dispatchLoopStartup() or preDispatch()
> > (the first will be executed exactly once, the second during each
> > iteration of the dispatch loop).
> 
> Okay, makes sense. So, let me make sure I get this. preDispatch() is
> called every time an action is dispatched; majority of the time it'll
> be called just once, but in cases where I use _forward() it'll get
> called twice? But dispatchLoopStartup() is only called once in that
> instance?
> 
> Either way, I moved all the code to the dispatchLoopStartup() and
> changed the get to getStaticHelper (was getExistingHelper) and it's
> still not working.
> 
> I also added a print statement to insure it's accessing that
> condition, and it is. I get no values from either variables.
> 
> 
> I also followed the examples in Zend_View() docs and it all fails
> badly. Creating a new Zend_View() instance, assigning a variable and
> calling render() -- Exception. Remove render() call -- no variable
> data.
> 
> I found out I need to use $this->view->variable but that doesn't work
> in the controller plugin either.

There's got to be something in your code that's wrong; I do exactly this
sort of thing in several applications, and it just works. I think to
diagnose this, I'd need to see:

  * The plugin
  * The controller class 
  * The view scripts

If you can attach those, or send a link to where to view them, I'll see
if I can figure out why you're having the issues you are. My inclination
is that you're not using the same view object in all locations somehow,
but I won't know for sure unless I see the code.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to