Thanks for your reply Edub!

I did actually read that thread previously, but I am unsure about how to
implement this.

I am not sure how I need to tell the application where the common templates
are (zf/applications/layouts), versus those templates that are specific to
each module (zf/application/layouts/news/views).

In my bootstrap I have this line:

Zend_Layout::startMvc($config);

where config files has the following layout parameters:

layout = "layout"
layoutPath = "/zf/application/layouts"
contentKey = "CONTENT"

When I run the application it shows all the common templates, but does not
show the templates of the module.

Any ideas?

++Tx
P


edub wrote:
> 
> 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-tp19038519p19047730.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to