Zend Framework: View variable in layout script is always null

Posted by understack on Stack Overflow See other posts from Stack Overflow or by understack
Published on 2010-04-22T05:58:33Z Indexed on 2010/04/22 6:03 UTC
Read the original article Hit count: 195

Filed under:
|
|

I set a view variable in someAction function like this:

$this->view->type = "some type";  

When I access this variable inside layout script like this:

<?php echo $this->type ?>

it prints nothing. What's wrong?

My application.ini settings related to layout

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.layout.layout = "layout" ; changed 'default' to 'layout'

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about layout