0
votes

I am developing a app in cakephp( ver 1.3) , where i need dynamic routing. So to do this i call requestAction method in config/ routes.php

$routingData=Object::requestAction(array('controller'=>'pages','action'=>'get_routes'));

Router::connect('/pages/blog', array('controller' =>'blogs', 'action' =>'index'));

It rendering properly but i am facing problem with pagination.

Original(Requested) url is (http://)localhost/pushpanelnew/pages/blog

Pagination link are like (http://)localhost/pushpanelnew/pages/get_routes/page:2 for page 2

But i want pagination link like (http://)localhost/pushpanelnew/pages/blog/page:2

I also try using this

$this->Paginator->options(array('url'=>$this->params['url']['url']));

But it showing link like

(http://)localhost/pushpanelnew/pages/get_routes/pages/blog/page:2

Also pagination is not working

But i want the pagination link like

(http://)localhost/pushpanelnew/pages/blog/page:2

Please help me , its very urgent.

Thanks

Timir Maji

1

1 Answers

0
votes

Try this.

$this->Paginator->options(array('url'=> array('controller'=>'pages', 'action'=>'blog'));