cake-php@googlegroups.com
[Top] [All Lists]

Re: Localize only some of a controller's pages

Subject: Re: Localize only some of a controller's pages
From: Ryan Schmidt
Date: Thu, 9 Dec 2010 21:38:29 -0600
For more context, I used the following code (taken from somewhere, I forget 
where) in my app_controller.php to set a different layout file for my admin 
pages:


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


This works fine; beforeRender() has no trouble inspecting or overwriting the 
name of the layout. So I had expected to be able to do the same kind of thing 
with the name of the view.



Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

<Prev in Thread] Current Thread [Next in Thread>