-- Jacky Chen <[EMAIL PROTECTED]> wrote
(on Sunday, 06 July 2008, 11:51 AM +0800):
> there is a method of setLayout(Zend_Layout $layout) in the view helper of
> Zend_View_Helper_Layout, how to call this method? the code, $this->layout(),
> in
> the view just return the instance of the Zend_Layout, not the
> Zend_View_Helper_Layout instance.
If you have an instance of the layout _helper_, this provides a
convience method for setting the layout. However, when using the helper
via a view, the layout() method will be called, returning the layout
object -- on which you can then do any operations you may want (set the
layout path, grab content segments, etc.) -- including setting the
layout script via.
> in the view file:
> <?php
> // call Zend_Layout::setLayout($name), not Zend_View_Helper_Layout::setLayout
> (Zend_Layout $layout)
> $this->layout()->setLayout('layout');
> ?>
>
> maybe it is a bug?
Nope.
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/