Zend Paginatorのシンプルな使い方
- 全200件を10件/1ページ毎表示する場合。
<?php $pager=Zend_Paginator::factory(200); $pager->setCurrentPageNumber(1); $pager->setItemCountPerPage(10); ?>
- Viewで使う場合
- PaginatorオブジェクトをViewにassignする
- paginationControl()を使ってページングナビゲーションを描画
- paginationControl($this->pager,"Sliding","path/to/pager.phtml") ?>
- 第2引数でスクロール形式を指定、第3引数でpagerテンプレートファイルの指定。
- paginationControl($this->pager,"Sliding","path/to/pager.phtml") ?>