Posted on 2010-04-18 15:51
Neil's NoteBook 閱讀(165)
評(píng)論(0) 編輯 收藏
Just a quick tip: I’m working on a project using Zend Framework and
needed to switch off layout and view renderer for a specific controller.
This can be achieved by adding the following calls to the controller’s
preDispatch()
method:
public function preDispatch()
{
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer- >setNoRender(true);
}