On Mon, Jun 24, 2013 at 8:42 AM, tonystamp <[email protected]> wrote:
> I am trying to use the flashmessenger controller/view plugin but i am not
> getting any output at all.
>
> In my controller i have:
> LocationController:
> /
>   public function addAction(){
>         /* snip */
>         $this->flashMessenger()->addMessage('New location successfully
> added.');
>         $this->redirect()->toRoute('location', array('action' =>'list'));
>     }
>
>     public function listAction(){
>         return array();
>     }/
>
> ..and in my list.phtml view:
> /echo $this->flashMessenger()->render();/
>
> I have tried all different sorts (addInfoMessage with render('info') for
> example) but the messages do not seem to be filtering through. If i
> var_dump($this->flashMessenger()->getMessages()) in my view the script just
> hangs :?

Reminder: FlashMessenger is designed for messages to be displayed on
the NEXT request, not the current one. If you will be displaying
messages in the current request, simply return them as part of your
view model.



--
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

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


Reply via email to