Zend Layout and Bootstrapping -
So I'm using standard zend layouts for my site. I have many custom controllers and ideas, and the content of these pages is displayed, but the details are not displayed in the main element of the layout. Do I need to manually associate Zend_Layout with each specific controller? I hope that since the layout is loaded through bootstrap, it should be available for free.
My app. There are # layout resources in the IE file
. Layout.layoutpath = APPLICATION_PATH "/ layout / script" resources.layout.layout = "layout" # resources.view [] = #viewsource.view.encoding = "UTF-8" resources.view.basePath = APPLICATION_PATH "/ view / "
My layout.phtml
& Lt ;? Php echo $ this- & gt; Headlight ()? & Gt; & Lt ;? Php echo $ this- & gt; JQuery () ;? & Gt; & Lt; / Head & gt; & Lt ;! - Application / layout / script / layout.file - & gt; & Lt; Body & gt; & Lt; Div id = "content" & gt; & Lt ;? Php echo $ this- & gt; Layout () - & gt; material? & Gt; & Lt; / Div & gt; & Lt; / Body & gt;
I am using the following in my Initializer .
Zend_Layout :: startMvc (array ('layout path' => = this-> _root. '/ Application / phpancake / layout', 'layout' = & gt; main '));
is the path to the _root directory where the app folder resides.
phpancake is the name of the module (your probably default ). layout is the directory under which my layout file main.phtml
Comments
Post a Comment