Hi Mark,

Thanks for the response. Am not confusing views with layouts. The files in
the structure i specfied are just for illustrative purposes.  I have both my
partials and layouts in different folders - just for less confusion for me.
What i decided to do is to move the layout folder to the root and have all
my layouts for both the CMS and Main site in there. so the structure now
becomes:

- webapp
  --> public_html
        ---> images
        ---> bla blah

  --->controllers
      --->views
               --->layouts
                        --->layout.phtml
                        --->layout-browse.phtml
              --->partials
                    
  -->modules
       --->admin
           --->controllers
           --->views
              


MarkDNA wrote:
> 
> I have something similar to that, but I'm not using the layout paths - I'm
> just dropping the layout into the views/scripts/ dir for each module, and
> for the main site (login screen in my case). You might just have to give
> it a try to see what your results are. You can set layouts in the
> controllers with:
> 
> $this->_helper->layout->setLayout('foobaz');
> 
> Looking at the names for your layouts, I hope you aren't confusing layouts
> with views. A view for your browse action and one for your edit action can
> use the same layout if you want. In a layout file you use
> $this->layout()->content to display the view for your controller action.
> So if you have an editAction() in you controller, $this->layout()->content
> will display edit.phtml where you place it in the layout. You use the
> views to include headers, navs, and footers mostly. Sorry if I'm off-base
> and you know this already!
> 
> -Mark
> 
> 
> dele454 wrote:
>> 
>> 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
>> 
> 
> 


-----
dee
-- 
View this message in context: 
http://www.nabble.com/Zend_Layout-tp19608818p19631518.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to