I don't seem to be able to use a custom route with pagination. The URL of the blog should be http://www.domain.com/en/page:2
. However, the links generated by the PaginateHelper (prev and next), keep adding the controller and action, so that the URL looks like http://www.domain.com/posts/index/en/page:2
.
The route config is quite simple:
Router::connect(
'/:lang/*',
array(
'controller' => 'posts',
'action' => 'index'
),
array(
'lang' => '[a-z]{2}',
'pass' => array(
'lang'
)
)
);
I set this in the view:
$paginator->options(
array(
'url' => $this->passedArgs
)
);
and also to set the path manually not using an array
this happens with Cake 1.33
Any help would be greatly appreciated!