【发布时间】:2011-04-26 15:22:29
【问题描述】:
我是 zend 新手,在引导程序中更改布局时遇到问题。我想在用户登录时更改布局。
我在引导程序中更改布局的功能是这样的:
protected function _initAuthState()
{
$layout = new Zend_Layout;
$layout->setLayoutPath('/layouts/scripts');
if (Zend_Auth::getInstance()->hasIdentity()):
// Logged in.
$layout->setLayout(layout2);
else:
// Not Logged in.
$layout->setLayout(‘layout’);
endif;
}
这段代码不行,布局总是一样的……求助!
【问题讨论】:
标签: zend-framework layout bootstrapping