Hi Mark,
Thanks for the response. So what you are saying is that as long as i keep
the startMvc() empty and specify my module paths, ZF will always look for
the layout.phtml files within the specified module directories?
In my scenario, i just have one module:admin module - where the cms apps
reside. But the main site just resides on the app root folder. For better
understanding here is my folder structure:
- webapp
--> public_html
---> images
---> bla blah
--->controllers
--->views
--->layouts
--->layout.phtml
--->layout-browse.phtml
-->modules
--->admin
--->controllers
--->views
--->layouts
--->layout.phtml
--->layout-edit-mode.phtml
Like i said before i simply want to keep the layout of my CMS separate from
that of the main site. The main site isnt a module. So what would my
startMvc() look like then with my folder structure in mind.
In my bootstrap i have something like this at the moment:
Zend_Layout::startMvc(array(
'layoutPath' => $config->paths->data .
'/module/admin/views/layouts');
I need to include that path layout path for the main site.
Thanks
MarkDNA wrote:
>
>
> dele454 wrote:
>>
>> I just want to know if one can specify more than one layout path in the
>> startMvc function? having something like this:
>>
>> Zend_Layout::startMvc(array(
>> 'layoutPath1' =>
>> $config->paths->data . '/module1/admin/views/layouts')
>> 'layoutPath2' =>
>> $config2->paths->data . '/module2/admin/views/layouts')
>> );
>>
>> Am asking because since layout.phtml is the default layout to be used
>> except if specified otherwise. What if i have the default rendering
>> layout.phtml in both folders how then can i let the Front Controller know
>> which layout i am referring to in what folder?
>>
>
>
> Not sure if this is what you are asking, but if you have modules set up
> with something like:
> $front->addModuleDirectory('application/modules');
> where your module1/, module2/, etc directories are in the modules/ dir,
> then ZF uses the layout.phtml file within the views/scripts/ dir for each
> module. I.e. module1/views/scripts/layout.phtml will be used for the
> controllers within module1; module2/views/scripts/layout.phtml will be
> used for the controllers within module2; etc. Looks like you're using
> different paths, but if you have that worked out, it shouldn't be a
> problem. I'm doing that myself right now. I am passing no params to
> Zend_Layout::startMvc().
>
> -Mark
>
>
-----
dee
--
View this message in context:
http://www.nabble.com/Zend_Layout-tp19608818p19622879.html
Sent from the Zend Framework mailing list archive at Nabble.com.