Hi Petr

try:

if (isset($this->params[CAKE_ADMIN])) {
}

useful methods:
pr ($this); die;
get_defined_vars();
get_defined_constants();

HTH,

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :)
You may get your answer quicker by asking on the IRC Channel (you can
access it with just a browser here: http://irc.cakephp.org).
On Nov 19, 3:48 pm, "Petr Vytlačil" <[EMAIL PROTECTED]> wrote:
> Any idea how global set layout for admin method and for other method
> other layout?
>
> Now its :
> ------------------------------
> Controller.....
>
> function admin_index(){
>    $this->layout = 'admin';
> ......
>
> }function index(){
>    $this->layout = 'public';
> ......
>
> }Its very boring set in all admin methods.
>
> Maybe resolution is in set beforeFilter in app_model but i dont know
> --any condition--
>
> function beforeFilter()
> {
>   if(--any condition--)
>   {
>     $this->layout = 'admin';
>   }else
>   {
>     $this->layout = 'public';
>   }
> 
> }Help please..


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