3
如何獲取最後一個頁碼,而不是$ this-> Paginator-> last()附帶的鏈接,但是實際的數字本身?獲取Cakephp中最後一頁的位數
如何獲取最後一個頁碼,而不是$ this-> Paginator-> last()附帶的鏈接,但是實際的數字本身?獲取Cakephp中最後一頁的位數
This link會幫助你達到同樣的效果。
<?php echo $this->Paginator->counter('{:pages}');
//counter() method with all options
//echo $this->Paginator->counter('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}');?>
您可以在您的視圖中調用counter()方法來獲取最後一個頁碼。
請問是否它不適合你。 – 2012-08-09 06:00:17
我不需要:結束,但:工作的網頁。所以我會給你答案。 – cdub 2012-08-09 06:02:00