Reputation: 9858
I want to send parameter from action to view which is not it's view, since each action has it's .phtml view . I want to redirect to index.phtml page when I am in editAction
inside the edit action I make
$this->_helper->redirector->gotoRoute(array('module' => 'visits', 'controller' => 'visit', 'action' => 'index'), 'visit');
so I can't use like this in the controller action
$this->message="Successfully saved";
I search in google I found that I can use
$this->getRequest()->setParam('message',"Successfully saved");
but How can I get the param in .PHTML page
Upvotes: 0
Views: 539
Reputation: 5122
you may use flash messenger , its capable to do such these tasks
FlashMessenger is a helper that allows you to store messages between requests. The most common use I have for it is for a "saved" message after doing an edit of an item that then redirects back to a list.
examples :
http://akrabat.com/zend-framework/zend-frameworks-flash-messenger-action-helper/
Upvotes: 1