CakePHP Pagination - how to remove "page:" from URL for a better seo / cleaner URL

When I use CakePHP paging, I get the following URL:

http://example.com/php/page:2

What I need to change in the controller, view and route.php to create a working URL, for example:

http://example.com/php/2
+4
source share
3 answers

Oh yes, now I see your question. Well, you can do something like:

function index($page){
  $this->paginate = array('page'=>$page);
  $this->set('stuff', $this->paginate('YourControllerName'));
}

See here for more details: http://bakery.cakephp.org/articles/view/basic-pagination-overview-3

, , , , , .

​​, , , , , .

http://www.mail-archive.com/cake-php@googlegroups.com/msg45878.html

+2

, , .

, , paginator . PaginatorHelper:: __ pagingLink(), , , () prev() .., .

, - AppHelper:: url(), "page" URL-, .

, .

0
source

All Articles