-- Dan Field <[EMAIL PROTECTED]> wrote
(on Monday, 12 November 2007, 10:11 AM +0000):
> After some advice on this list last week I've been looking at Zend Layout, 
> and it does everything I need except one single action in my project (which 
> renderds a JPEG and therefore does not require a layout).
>
> I'm getting the following error:
>
> PHP Fatal error:  Call to undefined method 
> Zend_Layout_Controller_Action_Helper_Layout::disableLayout() in 
> /var/www/proficcymod/application/controllers/TestController.php on line 39
>
> Line 39 reads:
>
> $this->_helper->layout->disableLayout();

Call the layout helper as a method call:

    $this->_helper->layout()->disableLayout();

Doing that calls the direct() method of the helper, which in turn
proxies to the getLayout() method, which returns the layout object
itself. I did it this way instead of writing a number of methods that
simply proxy to the object itself; now you have access to the entire
layout object.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to