class AboutController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$this->getResponse()
->appendBody(' hello from aboutAction');
$this->_forward( 'nothing','index', null, array( 'email' => 'me@example' ) );
}
public function contactAction()
{
$this->view->pageTitle="boolbool";
}
}
This index action calls nothing controller’s index function:
class NothingController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
$email=$this->_getParam('email','not found');
$this->getResponse->appendBody('The email is: '.$email );
}
}
But the nothings index action never gets triggered..I get page not found in the about page instead..why?
I cant even access my nothing controller, even when it exist in a file along with about (I can trigger the about action , though)
I think your for
$this->_forward()params are the wrong way round:from Zend Framework’s
Zend_Controller_Actionclass:So for you it should be: