Pager: problem with getCurrentPageID()

From: Date: Sat, 03 Jan 2004 23:31:40 +0000
Subject: Pager: problem with getCurrentPageID()
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9940@lists.php.net to get a copy of this message
Hi I'm building a pagable table using the sliding method and have a problem with the $pageID. When trying: ---- require_once('Pager/Pager.php'); $params = array( 'mode' => $this->mode, 'perPage' => $this->rowsPerPage, 'delta' => $this->delta, 'itemData' => $listData, 'append' => false ); $this->pager =& new Pager($params); $pagedListData = $this->pager->getPageData($this->pageID); $links = $this->pager->getLinks(); ---- I use $this->pageID rather than passing $_GET['pageID'] but the Pager class seems to rely on the GET var to produce the right results in getLinks(), getCurrentPageID(), etc. In getLinks I can $this->pager->getLinks($this->pageID) which fixes the links but current, next and previous don't work. Would it be possible to allow the passing of the $pageID in the Pager_Sliding contructor as an option - 'currentPage' (not sure that when setOption is called, it would overwrite $this->_currentPage but might be a way to do it if it does?)? Any further suggestions to fix this? Thanks! -- Simon H

« previous php.pear.general (#9940) next »