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'])));
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment