On Tue, Mar 10, 2009 at 10:07 AM, Alfredo Quiroga-Villamil
<[email protected]> wrote:
>
> I believe one way to achieve this is by using:
>
> $this->render()
>
> http://api.cakephp.org/class/app-controller#method-AppControllerrender
>
> from your controller and render the view you want. This would likely
> be based on certain conditions based on your previous email. So you
> would end up with a case statement and then rendering the view you
> want.
Also, you can change $this->viewPath in the controller if your view is
under a different directory. Say you have a FoosController and the
following views.
VIEWS
foos
view_1
view_2
other_dir
view_3
$this->viewPath = 'other_dir';
$this->render('view_3');
You'd likely not want to do that but you can use the same technique to
render an element directly:
$this->viewPath = 'elements/some_dir';
$this->render('some_element');
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---