On 12 Nov 2007, at 13:01, Matthew Weier O'Phinney wrote:

-- 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.

Thanks Mathew. That is a little neater.

I've run into a small problem now where the layout stops getting rendered right after my echo statement in this code segment bellow.

        
         <div class="debugContainer">
        </div>
        <?php echo $this->layout()->content; ?>
</div>
</body>
</html>

Those last 3 tags (or anything else I try and echo or hard code) never render in the browser.

--
Dan Field <[EMAIL PROTECTED]>                   Ffôn/Tel. +44 1970 632 582
Peiriannydd Meddalwedd                                 Software Engineer
Llyfrgell Genedlaethol Cymru                   National Library of Wales



Reply via email to