you could also use the following format:
/Items/new/whatever
then within your Items controller
function new($page) {
}
I'm pretty sure Cake allows you to define as many parameters as you
want in this way:
/Items/new/whatever/more/parameters
then within your Items controller
function new($page, $param2, $param3) {
}
as i said, i'm pretty sure this is the case so give it a crack first.
one thing i did stumble across along the way (i think someone on this
list mentioned it) is that controller actions generally expect the
first argument to be the id of the model. i can't remember the exact
ramifications of this point but thought it worth mentioning in case
you run in to trouble.
from (my very vague) memory i think it had something to do with trying
to create a new record and Cake thinking I was updating an existing
one. overcome with the Model->create() function.
On 25/09/06, BlenderStyle <[EMAIL PROTECTED]> wrote:
>
> Okay, I figured out how to do this. My link looks like this:
> $html->link('New Item', '/Items/new?page=whatever');
>
> And inside my controller I use this:
> $this->params['url']['page'];
>
> The key was to use $this->params which contains all kinds of good
> stuff. However, I ended up taking a slightly different approach for my
> site, after going over everything.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---