Hello Mathew,
I tried this option as well ...
$paginator->options(array('url' =>array('uid'=>$this->params['uid'])));
but the url produced looks like:
http://x.com/users/<uid>/friends/<uid>/page:2
where as i expect it to be:
http://x.com/users/<uid>/friends/page:2
Dont know whats wrong with my parameter passing.. :(
Thanks.
On Sat, Nov 1, 2008 at 8:53 PM, Mathew <[EMAIL PROTECTED]> wrote:
>
> Hi Novice,
>
> There are a couple of things here.
>
> Router::connect('/users/:uid/friends/*', array('controller' =>
> 'users','action' => 'friends'),array('pass'=>array('uid')));
>
> This is not a named parameter, because you are passing the argument
> "uid" to the controller's action as a function argument.
>
> The syntax ":uid" looks like a named parameter, but it is not a named
> parameter. Named parameters must be registered with the Router using
> the "connectNamed" method before defining your routes.
>
> CakePHP comes with a collection of predefined named parameters. Such
> as those found in the paginate helper.
>
> Still, there is nothing wrong with your routing. To have paginate
> generate router friendly URIs you need to tell it about the UID
> arguments.
>
> In your view add the following.
>
> $paginator->options(array('url' =>array('uid'=>$this-
> >params['uid'])));
>
> >
>
--
Thanks & Regards,
Novice.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---