On Sat, Dec 11, 2010 at 10:27 PM, Ryan Schmidt
<[email protected]> wrote:
>
> 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?
Whenever I've wanted to render a different view, I've done:
$this->viewPath = 'some/path/from/views/dir';
$this->render('view_name');
So, I think you'd need to put your test inside beforeRender().
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