如何为给定的Controller Action方法指定自定义视图脚本?
例如:
Class UserGalleryController extends Zend_Controller_Action
{
public function fooAction()
{
$this->view->actionMsg = 'foo';
// (uses foo.phtml automagically)
}
public function barAction()
{
$this->view->actionMsg = 'bar';
//use foo's view script ?????
}
}
I basically want to have one view script (foo.phtml)
谢谢: - )
答案 0 :(得分:0)
public function barAction()
{
$this->view->actionMsg = 'bar';
$this->render('foo');
}