I have an acti开发者_如何学运维on, successAction(), it uses the file in my views folder, success.phtml, how do I tell the action that I want it to use the success2.phtml file instead
Use Zend_Controller_Action
's render
. This would render the view script in controller-name/success2.phtml
class ControllerName_Controller_Action extends Zend_Controller_Action
{
public function successAction()
{
$this->render("success2");
}
}
You should read the docs on Zend Controller's for more.
$this->render('success2');
精彩评论