First in your bootstrap you need to setup your Zend_Layout MVC instance
correctly and tell it where the main layout template files are stored.

Take a look at the code in my posting here:
http://www.nabble.com/Zend-View-with-Zend-Layout-Question-td19017745.html





pvechi wrote:
> 
> I am building an application which has several modules (news, forums,
> etc).  These modules will use the same header and footer files.
> 
> I am trying to implement the Zend_Layout component to manage the template
> phtml files, etc. However, I am running into difficulties in that I do not
> know how to tell zend_layout where the layout files for each module are
> stored (I am not sure if this approach is good either).
> 
> Firstly, here is my file structure:
> 
> zf
> 
>       application
> 
>                       layouts
> 
>                       news
> 
>                               controllers
> 
>                               modules
> 
>                               views
> 
>                       forums
> 
>                               controllers
> 
>                               modules
> 
>                               views
> 
>                       blogs
> 
>                               controllers
> 
>                               modules
> 
>                               views
> 
> 
> I have a common bootstrap file for the above.
> 
> www/index.php
> 
> 
> Is there a way I can use the layout files (header.phtml, footer.phtml)
> saved in the layouts directory, together with the phtml files specific to
> each module (news, forums, blogs) using Zend_layout?
> 
> I have been searching for this type of implementation but could not find
> something concrete.
> 
> ++Tx
> P
> 

-- 
View this message in context: 
http://www.nabble.com/Zend-Layout---multiple-modules---common-templates-tp19038519p19038874.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to