开发者

Zend Layout Question

Hi i have a lot of common html that i want to use in a lay开发者_StackOverflow社区out by doing :

zf enable layout

however the problem is want this layout to be shown on every action apart from the loginAction() that i have created within the controller?


IF I understand correct, you are looking for somthing like this:

    $this->_helper->layout->setLayout('foobaz');

Just add it to your loginAction and replace foobaz with the layout you really want to display.

More information about the layout can be found at:

http://framework.zend.com/manual/en/zend.layout.quickstart.html


You can disable the layout in an action by using:

$this->_helper->layout->disableLayout();


I do it the way @Stegeman said, by putting $this->_helper->layout->setLayout('foobar'); on the init() of my login/authentication controller, where there are other pages like retrieve password page. So those pages all have a different layout than the default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜