You could store it in the session and have your controllers check that
in beforeFilter(). Or, rather, check to see if it's in $this->params
first, then session, and finally have a default to fall back on.

On Mon, Jul 7, 2008 at 5:52 AM, sam <[EMAIL PROTECTED]> wrote:
>
> Dear Cake pros,
>
> I have a route that allows me to switch the layout by supplying it as
> the first parameter in de URI. Example for using the "green" layout:
>
> http://myhost/green/items/index
>
> Here's the route:
>
> Router::connect('/:layout/:controller/:action/*', array('controller'
> => 'items', 'action' => 'index') ,array('layout' => 'red|green'));
>
> Now, I would like my controllers to propagate the "layout" parameter
> automatically, without requiring me to code this manually wherever I
> create a link or redirect to a page. Is this possible?
>
> If not, what would be the best way to achieve this?
>
> Thank you very much.
> Sam
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to