After doing some more searching, I came across the section in the cookbook concerning prefix routing. There were one or two little things that I was doing incorrectly, and those have been corrected.
However, I took a look at the example that they set out in the cookbook, and tried it in my application. I copied and pasted the route, as well as the PHP code to create the link using the HTML helper, and it still did not work. The prefix was ignored completely. This seems like it could be a bug? On Mar 6, 3:46 pm, geoff <[email protected]> wrote: > Yeah, I've tried every possible combination that I can think of, and > nothing seems to work correctly. One thing I have noticed is that when > the passedArgs array is passed to the paginator helper, if there is > any other named parameter other than "page", the routes do not work. > So, I'm guessing that this is probably something to do me not having > my routes set up correctly. > > However, I didn't think that named parameters influenced the routes at > all. Perhaps someone could enlighten me on this? > > On Mar 6, 1:10 pm, majna <[email protected]> wrote: > > > It's not working even you pass all params to paginator in view: > > $paginator->options(array('url'=>array_merge(array('prefix'=>$this->params['prefix']),array('wap'=>true), > > $this->passedArgs))); > > > debug($paginator->options); > > Bug? > > > I would like to see multiple Routing.admin, like > > Routing.admin > > Routing.user > > Routing.public.. > > > For now cake use only one. > > > On Mar 6, 8:53 am, geoff <[email protected]> wrote: > > > > Hey all. > > > > I have a fairly troublesome problem that has really been grating my > > > goat for the past little while. It has to do with the supplying of > > > named parameters to aURL, and having them break mypagination. I have > > > a feeling that the example below might explain this better: > > > > ----------------------- > > > > __Route configuration__ > > > Router::connect('/wap/', array('controller' => 'categories', 'action' > > > => 'index', 'prefix' => 'wap')); > > > Router::connect('/wap/:controller/:action/*', array('prefix' => 'wap', > > > 'wap' => true)); > > > [ As far as I can understand, this will map /wap/users/view/4 => > > > userscontroller/wap_view/4 ] > > > > ----------------------- > > > > __Pagination__ > > > <?php $paginator->options(array('url' => $this->passedArgs))?> > > > [ This is what I am using to set thepaginationURLoptions. ] > > > > ----------------------- > > > > Now, this works fine when I have no named parameters (e.g.URL: /wap/ > > > products/index/22/page:3/). However, as soon as I add in another named > > > parameter - no matter what the named parameter - the URLs used in > > > thepaginationare broken; they don't seem to use the reverse routing > > > anymore. This is an example of the kinds of URLs that are generated > > > once another named parameter is added: /products/wap_index/22/page:3/ > > > images:on. > > > > So, as you can see, it merely takes the user to the controller/actionURL, > > > which is not the way that I would want it. > > > > I'm suspecting that this might actually just be because there is some > > > silly parameter that I haven't included or something. If there is > > > anyone that can help me, or at least point in the a decent direction, > > > I would really appreciate it! > > > > Cheers, > > > Geoff --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
