Or even better, no parameter needed:
function admin_add()
{
return $this->setAction('add');
}
function add()
{
if (isset($this->params[CAKE_ADMIN]))
{
$this->render('admin_add');
}
}
-MI
---------------------------------------------------------------------------
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de Mariano Iglesias
Enviado el: Domingo, 25 de Marzo de 2007 05:53 p.m.
Para: [email protected]
Asunto: RE: Admin Routing Techniques
No, setAction() will set the $controller->action to 'add' and therefore
render() will render add.ctp
But you can use a parameter:
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---