Hi all,

at first i think i should tell you i am new to cakePHP.

I went into a problem with the paginator and i think, the correct
routing.
I need to paginate two models on the same page, one with ajax, one in
the "normal" way.
So ive used this excample for me:
http://debuggable.com/posts/how-to-have-multiple-paginated-widgets-on-the-same-page-with-cakephp:48ad241e-b018-4532-a748-0ec74834cda3

It works great, but when iam defining my router for different
languages lke this:

Router::connect('/:language/:controller/:action/*',
                                        array(),
                                        array('language' => '[a-z]{3}'));

and make language switching available for the users, the paginator
links doesnt work correctly anymore.

now paginator links (next/prev) look like this:
/controller/action/params/page:2/language:deu/model:Project

and not like desired:
/deu/controller/action/params/page:2/model:Project


i tried to override the pagionator options in this way...

$paginator->options(
                array(
                        'url'=>array_merge(
                                array(
                                        'language'=>$language,
                                        
'controller'=>$this->params['controller'],
                                        'action'=>'displayText',
                                        'model'=>$model
                                ),
                                $this->passedArgs
                        ),
                        'model'=>$model
                )
        );

But this has no effect, the language parameter is always set next to
the page parameter... i dont understand why.

Can anybody help me out of this?

Thank you very much!
Robin

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to