I have a controller action and I want it to be executed after any action. I have written an action helper with this method:
public function postDispatch(){
$actionstack = Zend_Controller_Action_HelperBroker::getStaticHelper('actionStack');
$actionstack->direct('myaction', 'mycontroller');
}
But it seems that it stuck in a loop, what is wrong with my code?
You could create a Plugin, for example:
So put the actions you want in this plugin and these aciotns will be executed after all.