With route you can define what variable are passed, using 'pass' = array() this will then format the named arguments into the url as /key/value instead of /key:value
On 2 Apr, 23:43, depi <[email protected]> wrote: > Hello guys, > > Currently I started adding routing to my application and I got stuck > when I realized that the routing is not applied to pagination which is > made through PaginatorHelper. > > For example I'm trying to build a url like: > appName/by-name/a > > My route looks like this: > Router::connect('/by-name/:id', > array('controller' => 'domains', > 'action' => 'view_by_alphabet'), > array('id' => '[a-zA-Z0-9]{1}') > ); > > The URL what I get from paginator looks rather like this: > appNamet/domains/view_by_alphabet/page:2 > > How can I achieve URL like: > appName/by-name/a/page:2 or appName/by-name/a/page/2 ? > > I heard something about connectNamed route, but I don't really know > what it is for and how I can use it in my issue. > > One last thing: I'm passing also these options to $paginator: > $paginator->options(array('url' => $this->passedArgs)); > > Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
