views:

75

answers:

1

Here is what i'm trying to do

<?php
class My_Controller_Plugin_SomePlugin extends Zend_Controller_Plugin_Abstract
{

    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
             $this->_helper->layout()->disableLayout();
    }
}

but it doesn't work, any ideas on how could i disable the layout inside a plugin ?

+1  A: 

This should be enough if you are using Zend_Layout::startMvc()

Zend_Layout::getMvcInstance()->disableLayout();
Goran Jurić