Posted on 2010-04-18 15:51
Neil's NoteBook 阅读(159)
评论(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);
}