hi

To avoid messing the core, in your /app/app_controller.php (create one
if none):

class AppController extends Controller {
  function beforeRender() {
    if ($this->name == 'Pages' && $this->action == 'your_static_page')
{
      $this->layout = 'other_layout';
    }
  }
}

If I remember well, I saw a method to set your layout in the view file,
maybe you can search it in the group

neospirit a écrit :
> Hi Andrew,
>
> Thanks for the reply. I actually am trying to avoid messing with
> cake/libs/controller codes. Your way by overwriting pages controller is
> working fine, but if there's no current cake's elegant workaround on it I'm
> considering to mimic its functionality by creating a statics controller and
> adding it to the routes config. That way future updates in cake core won't
> affect my apps. Though I doubt there'll be major changes in cake's way with
> the pages controller or critical use with it in the core, it's better to
> play safe IMHO. Just exploring and learning best cake practice with the
> small stuff.
> 
> Thanks again.
> 
> Uwie


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