Thought Id share my hacking attempts, as I cannot see a paging implementation yet. This is using PEAR Pager, it will also work with Structures_Datagrid. Unless there is a wrapper created it can only use the array as the datasource for now, and both do the limiting but oh well.

$page = $this->getRequest()->getParam('page',1);

$select = $this->db->select()
           ->from('table')
           ->limitPage($page, 5);

$result = $select->query();
$arr = $result->fetchAll();

$path = $this->getRequest()->getControllerName().'/'.$this->getRequest()->getActionName();


$pager = & Pager::factory(array('currentPage'=>$page, 'mode' => 'Sliding','append' => false, 'path'=>'/','fileName'=>$path."/page/%d", 'perPage' => 5, 'itemData' => $arr));
$this->view->recordSet  = $pager->getPageData();
$this->view->pagerlinks = $pager->links;

Still trying to find a way to hack something up that is elegant and doesnt require formatting the array to make it list the recordset array as 2 columns per row kind of thing ?

Reply via email to