Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const PAGE_SIZE=50;
- // ... in the action ....
- $potentialListings = $store->getAgedStock($filters); // this returns an array of objects
- $pages = new CPagination(count($potentialListings));
- $pages->pageSize = self::PAGE_SIZE;
- if (isset($_GET['page'])) {
- $pages->currentPage = $_GET['page'];
- } else {
- $pages->currentPage = 0;
- }
- $this->render('list',array(
- 'potentialListings'=>$potentialListings,
- 'store' => $store,
- 'filters' => $filters, // for use in the filter form
- 'pages' => $pages // for paginator
- ));
- // ... and in the view ...
- $this->widget('CLinkPager',array('pages' => $pages)); // this renders nothing at all
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement