Zend Framework: view var set in bootstrap not accessible in view scripts?

Posted by understack on Stack Overflow See other posts from Stack Overflow or by understack
Published on 2010-04-27T13:00:53Z Indexed on 2010/04/27 13:03 UTC
Read the original article Hit count: 251

Filed under:
|

I've set a view var in bootstrap file like this:

protected function _initVars()
{
    $this->bootstrap('layout');
    $layout = $this->getResource('layout');
    $view = $layout->getView();
    $view->theme = 'MY_THEME';
}

My application.ini has following line as well:

resources.view[] =

But inside view scripts,

<?php echo $this->theme ?> 

prints nothing.

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about php