【发布时间】:2009-11-24 06:37:27
【问题描述】:
啊,原谅我的 Zend 新手,我正在尝试访问此表单,存储在:
layouts/scripts/layout.phtml:
$this->layout()->userForm = $this->action('index', 'user');
在
class IndexController extends Zend_Controller_Action
{
public function init ()
{ /* Initialize action controller here */
}
public function indexAction ()
{
// here
}
}
indexAction,除了在布局中,我基本上还需要表单出现在首页。
我尝试使用 $this->_helper->layout()->userForm 访问它,但我怀疑控制器中的代码在布局之前运行,因为它没有给我想要的东西。
【问题讨论】:
标签: php zend-framework