Cómo setear desde un Controller variables de un Zend_Layout

abril 26th, 2011 Posted by php, zend framework 0 thoughts on “Cómo setear desde un Controller variables de un Zend_Layout”

En el controller:
 

class MyController extends Zend_Controller_Action {
    public function init() {
        $this->_helper->layout->getView()->myVar = 'Value';
    }
}

En el layout.phtml

<? echo $this->myVar; ?>

Copyright © 2018 programadorfreelanceargentina.com

Programador Freelance Argentina