How do I tell Zend Framework to use a different view file than the default file for the action?

I have an action, successAction (), it uses the file in my views folder, success.phtml, how can I say that I want it to use the success2.phtml file instead

+3
source share
2 answers

Use Zend_Controller_Action render. This would create a script view in the controller name / success2.phtml

class ControllerName_Controller_Action extends Zend_Controller_Action
{
    public function successAction()
    {
        $this->render("success2");
    }
}

You should read the documents in Zend Controller for more details.

+9
source
$this->render('success2');
+2
source

Source: https://habr.com/ru/post/1777041/


All Articles