I would use a beforeFilter and test for $this->params['admin'];

function beforeFilter(){
  if (isset($this->params['admin'])) {
    $this->layout = 'admin_layout_name';
  }
}

Geoff
--
http://lemoncake.wordpress.com

On Jul 13, 7:33 am, Travis Cline <[EMAIL PROTECTED]> wrote:
> On Jul 12, 3:17 pm, Mech7 <[EMAIL PROTECTED]> wrote:
>
> > Yes but is it possible to do this for all admin pages?
>
> > On Jul 12, 8:45 pm, Michael Augustyniak <[EMAIL PROTECTED]>
> > wrote:
>
> > > Mech7 wrote:
> > > > I am using the /admin for tasks like editing / adding / deleting only
> > > > I am wondering is it possible to automatically load a different layout
> > > > for the the admin instead of the default.ctp?
>
> > > this is whta U look for
> > > $this->layout = 'name';
>
> A simple approach is in a beforeFilter in your AppController, check
> the action name and if it starts with 'admin_' switch to admin layout.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to