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
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
: 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
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,
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
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
---
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()
{
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
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