If you however want to switch layouts with a parameter you could do it
like this
class PagesController extends AppController
{
function info($layout = null)
{
switch($layout)
{
case 'spring' :
$this->layout = 'spring';
break;
case 'summer' :
$this->layout = 'summer';
break;
default :
$this->layout = 'default';
break;
}
// other stuff
}
}
haven't tested this but i hope it points you in the right direction :)
On Nov 5, 4:01 am, jmw <[EMAIL PROTECTED]> wrote:
> I have a very simple site and am new to cake, but not MVC frameworks.
> I currently use the default Pages controller to render the pages in
> the site, very few of them need their own customer controller /
> logic. I do however need some of them to switch to a different
> layout. I have defined a default layout, and am trying to find a way
> to specify that a page should be rendered with another layout, via a
> routes call, or some other call at the top of the template page, or a
> request parameter.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---