Disable layout in Zend Framework 3?

1.9k views Asked by At

How to disable layout in Zend Framework 3?

Trying to get response from an Ajax call, it needs layout to be disabled.

1

There are 1 answers

0
tasmaniski On

Here it is

public function indexAction(){
    $view = new \Zend\View\Model\ViewModel();
    $view->setTerminal(true);

    return $view;
}