title: How to disable layout and view renderer in ZF2?
body: <p>How can i disable layout and view renderer in Zend Framework 2.x? I read documentation and can't get any answers looking in google i found answer to Zend 1.x and it's </p>
  
  <pre><code>$this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender(true);
  $this-&gt;_helper-&gt;layout-&gt;disableLayout();
  </code></pre>
  
  <p>But it's not working any more in Zend Framework 2.x. I need to disable both view renderer and layout for Ajax requests.</p>
  
  <p>Any help would be great.</p>