开发者

how to disable both layout and renderer on entire Zend Framework application

I know how to disable them开发者_开发知识库 on specific controller:

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

And I know how to disable renderer in the bootstrap:

Zend_Controller_Front::getInstance()->setParam('noViewRenderer', true);

Is there any chance to disable layout in the bootstrap?


Try:

$l = Zend_Layout::getMvcInstance();
$l->disableLayout();

That will disable your layout. setNoRender will disable all output, which one do you want? (In your post you state layout)


IFAIK the layout is disabled by default, until you enable layout resource in application.ini, so disable it there.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜