I have routes set up with the admin
prefix, the page I'm having trouble with has this path:
http://mydomain.com/admin/posts
I want this to be a paginated list of blog posts. That URL calls the admin_index
action in my posts
controller. Pretty simple.
At the bottom of my view I have this:
<?php echo $this->Paginator->numbers(array('first' => 1, 'last' => 1, 'separator' => '')); ?>
However, the pagination links send me to a URL that doesn't exist:
http://mydomain.com/posts/admin_index/page:2
I need it to generate a link such as:
http://mydomain.com/admin/posts/2
How can I do this? I've already tried setting my paginator options like so:
<?php $this->Paginator->options(array(
'url'=> array('controller' => 'posts',
'action' => 'index',
'prefix' => 'admin'
))); ?>
But that makes a URL like so:
http://mydomain.com/posts/index/prefix:admin/page:2
How can I get this to work?