I don't have a solution, but in your second example, it will never
execute the render() method because you're doing a return on the
previous line. Maybe just a typo but thought I'd flag it just in case.

Adam

On Mar 24, 7:12 am, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> In my current app, I've enables admin routing. There are certain actions I
> want to appear in the /admin path. Rather than repeat the logic of the
> existing actions in the admin_xxxx() actions, I thought it'd be best to just
> call these actions from the admin_xxxx() actions required.
> So, I was wondering if I would be best to simply call either requestAction()
> on the required actions, or call the action directly?
>
> e.g.
> Regular Action:
>
>     function add() {
>         ....
>         ....
>         // some logic
>     }
>
> Admin Action:
>
>     function admin_add() {
>         $this->requestAction($this->viewPath . '/add);
>         $this->render('admin_add');
>     }
>
> or
>
>     function add() {
>         return $this->add();
>         $this->render('admin_add');
>     }
>
> Alternatively, has anyone come up with anything better?
> What do you think?
>
> Cheers,
>
> Sonic


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

Reply via email to