bilou
bilou

Reputation: 13

How to disable layout inside a plugin?

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 ?

Upvotes: 1

Views: 774

Answers (1)

Goran Jurić
Goran Jurić

Reputation: 1839

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

Zend_Layout::getMvcInstance()->disableLayout();

Upvotes: 3

Related Questions