Petr
Petr

Reputation: 11

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?

Upvotes: 1

Views: 2123

Answers (2)

takeshin
takeshin

Reputation: 50638

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

Upvotes: 1

Ashley
Ashley

Reputation: 5947

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)

Upvotes: 4

Related Questions