Cakephp Pagination rendering issue. I am using cakephp 2.0.6. When i try to render a page from other action its fine. But when i try to go to next page the problem starts
I have the following function
public function admin_index()
{
//Function listing
}
The same function needed for all type of users(support,employee etc). So I used the setAction method as follows
public function support_index()
{
$this->setAction('admin_index');
$this->render('admin_index');
}
And my Pagination code is as follows :
echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
echo $this->Paginator->numbers(array('separator' => ''));
echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
But when I try to go next page the URL as follows
http://www.example.com/support/users/admin_index/page:2
http://www.example.com/employee/users/admin_index/page:2
But the following output needs to come :
http://www.example.com/support/users/index/page:2
http://www.example.com/employee/users/index/page:2
The Problem is $this->setAction('admin_index'); i think.. any one helps appreciated