I'm using the Tags Plugin from cakedc.com, and I have a problem generating the proper paging links using the PaginatorHelper.
The desired result is to strip the plugin name from the generated hrefs, because the plugin will be added in routing. i.e. http://localhost/tags/photos/oregon/page:4/perpage:28
This is what I have:
app/config/routes.php (to map '/tags'=>'/tags/tags', i.e. to the Tags plugin)
Router::connect('/tags/:action/*', array('plugin'=>'tags', 'controller'=>'tags'));
// map /tags => /tags/tags
code in view file:
<?php
$this->Paginator->options['url']=array_merge(
array('plugin'=>'tags'),
$this->Paginator->options['url']
);
echo $this->Paginator->numbers(array('separator'=>null, 'modulus'=>'20'));
// debug($this->Paginator->options[url] => Array
// (
// [controller] => tags
// [action] => photos
// [0] => oregon
// [perpage] => 28
// [page] => 4
// )
// )
// sample href="http://localhost/tags/tags/photos/oregon/page:4/perpage:28"
// note the '/tags/tags' i.e. /:plugin/:controller
?>
BU, I notice the following, if I set options['url'] as follows:
<?php
$this->Paginator->options['url']=array('plugin'=>'tags');
echo $this->Paginator->numbers(array('separator'=>null, 'modulus'=>'20'));
// debug($this->Paginator->options[url] => Array
// (
// [plugin] => tags
// )
// )
// sample href="http://localhost/tags/photos/page:4"
?>