On Dec 11, 2010, at 21:24, Dave Maharaj wrote:

> You mean in the whatever_controller?
> 
> This?
> 
> function beforeFilter() {
>       //run parent first
>       parent::beforeFilter();
>       //run local to make specific change 
>       $this->layout('alternate_layout');
>               
> 
> }

Exactly. As I previously posted in this thread, I use a code block similar to 
that, not in a whatever_controller, but in app_controller.php (i.e. globally), 
to change $this->layout to 'admin' when on an admin page. I want to do similar 
global trickery with the name of the view, for localization purposes, but 
unlike the name of the layout, I cannot find any place in the object where the 
name of the view is available. Is it there somewhere and I've missed it?



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