Re: Admin Routing Techniques

2007-03-27 Thread Sonic Baker
Hi Guys, Thanks again for the further suggestions. @french13: Unless I'm not following what you are suggesting, I don't think you're following what I'm asking, (in which case I'm not surprised when I come out with sentences like this one :) I'm just looking for the best way to minimise code

Re: Admin Routing Techniques

2007-03-27 Thread Sonic Baker
Hi Mariano, On 3/25/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Or even better, no parameter needed: function admin_add() { return $this-setAction('add'); } This works a treat, cheers. Sonic --~--~-~--~~~---~--~~ You received this message

Re: Admin Routing Techniques

2007-03-26 Thread fr3nch13
: cake-php@googlegroups.com 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

Re: Admin Routing Techniques

2007-03-26 Thread R. Rajesh Jeba Anbiah
On Mar 27, 12:17 am, fr3nch13 [EMAIL PROTECTED] wrote: Ir Even better just bake it... if you can't bake it then: (i haven't played with 1.2 yet, but unless it was drastically changed from 1.1.x, this is how you i do it:) change: turn on admin routing,

Re: Admin Routing Techniques

2007-03-25 Thread digital spaghetti
I had a similar quandry and came up with a simple solution - not to use Cake's admin routing. Instead, I've written an admin controller that gives me a backend admin screen. Whenever I call to a method in another controller, I just use /path/method. In each method, I call a session check

RE: Admin Routing Techniques

2007-03-25 Thread Mariano Iglesias
This is wrong: function admin_add() { $this-requestAction($this-viewPath . '/add); $this-render('admin_add'); } Instead do: function admin_add() { return $this-setAction('add'); } -MI ---

Re: Admin Routing Techniques

2007-03-25 Thread Sonic Baker
Thanks for all the replies people, On 3/25/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Instead do: function admin_add() { return $this-setAction('add'); } Just wondering if setAction() allows rendering of a different view after the call? Like: function admin_add() {

RE: Admin Routing Techniques

2007-03-25 Thread Mariano Iglesias
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Sonic Baker Enviado el: Domingo, 25 de Marzo de 2007 05:19 p.m. Para: cake-php@googlegroups.com Asunto: Re: Admin Routing Techniques Just wondering if setAction() allows rendering of a different view after

Re: Admin Routing Techniques

2007-03-24 Thread Adam Royle
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