Views are rendered using a hierarchy of ViewModel objects -- the layout only 
has direct access to the top level, and the ViewModels created by your 
controller actions are attached as children of the layout...

If you need to set values directly in the top-level layout, you can use the 
layout() controller plug-in.

- Demian
________________________________________
From: Ralf Eggert [[email protected]]
Sent: Friday, August 24, 2012 8:29 AM
To: [email protected]
Subject: Re: [fw-general] ZF2: Access FlashMessenger from view helper

Hi again,

actually, I don't get it. My view helper ShowMessages() should be called
within my layout script. But I have big problems to pass any variable to
the layout script. I had a look at the Layout Controller Plugin, but
that did not get me any further. I looked through the reference guide
but did not find any answer to it.

This leads me to two questions:

How can I pass variables to be accessible within my layout script?

How can I access the variables from the layout script within a view
helper that is called in this layout script?

Thanks and best regards,

Ralf

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]



--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to