Fair enough :-)

In my own app, I change the layout on a per-controller basis, using a
front-controller plugin, hooking into dispatchLoopStartup().  (You could
also choose a layout on a per-module basis, a per-action basis, or any
combination of these).  If I've understood correctly, this is called exactly
once per request, regardless of any later _forward calls.  So, if you set
the layout at this stage, no matter what you do later, the original layout
should be used.  Probably ;-)  I don't have any _forwards between
controllers, so I haven't tested it as you describe.

It does mean that you have to maintain the layout logic outside the
module/controller/action that you want to control the layout for, but I find
that the layout logic changes rarely enough that it's not a problem.  YMMV.







antonM wrote:
> 
> Hi lightflowmark, thanks for your followup. I appreciate it. =^D
> 
> Let me explain my point in more detail so you can get a better picture of
> what I'm trying to do. Below is the directory structure of my
> module/controllers which I will use to help explain the following details
> of the project.
> 
> /application
>    /product
>       /controllers
>          ListingController.php
>       /views
>          list_products.phtml
> 
>    /setting
>       /controllers
>          SetupController.php
>       /views
>          /layouts
>             setup_layout.phtml
> 

-- 
View this message in context: 
http://www.nabble.com/communicating-with-forwarded-action-tp23173951p23197370.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to