Monday, June 21, 2010

Re: CakePHP 1.3 reverse routing in pagination

try
http://groups.google.com/group/cake-php/msg/e5231eac6bdbecc6

On Jun 22, 12:21 am, Alberto <albertolopezru...@gmail.com> wrote:
> I recently migrated my system to 1.3. I solved most of the issues but
> not the pagination links in some views therefore I need some help.
>
> routes.php
>
>     Router::connect('/usuarios/:id/:action/*', array('controller' =>
> 'Usuarios', 'action' => ':action','id' =>
> ':id'),array('id'=>'[0-9]+'));
>
> view
>
>     $url = array('url'=>array('controller' => 'usuarios','id' =>
> $usuario_id,'action'=>'votos'))
>
>     $paginator->prev("<< ".__('Anterior',true), $url );
>     $paginator->numbers(array_merge(array('separator'=>''),$url));
>     $paginator->next(__('Siguiente',true)." >>", $url);
>
> rendered url in html (/controller/id/page:n/id:action)
>     /usuarios/3/page:2/id:votos
>     /usuarios/3/page:3/id:votos
>     ....
>
> However the url I want, as I defined in the routes.php should be (/
> controller/id/action/page:n)
>     /usuarios/3/votos/page:2
>     /usuarios/3/votos/page:3
>
> Any suggetion? Thanks

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate