How To Get A Simple Pagination Just Having Prev,next Link

I fetch some records from another web server with offset,limit parameters(like mysql). However, to keep better performance, the server just return a page of record and tell me ture if having more records or false. it does not tell me the total item count,

So I just need a pagination with prev,next link. How to solve this? Must I rewrite CPagination, CLinkpager?

Any suggestions will be appreciated.

hi, I have already solved it, thank.




class EHasNextLinkPager extends CBasePager

{

...

	protected function createPageButtons()

	{

		$currentPage=$this->getCurrentPage(false); // currentPage is calculated in getPageRange()

		$buttons=array();


		// first page

		$buttons[]=$this->createPageButton($this->firstPageLabel,0,$this->firstPageCssClass,$currentPage<=0,false);


		// prev page

		if(($page=$currentPage-1)<0)

			$page=0;

		$buttons[]=$this->createPageButton($this->prevPageLabel,$page,$this->previousPageCssClass,$currentPage<=0,false);


		// next page

		$page=$currentPage+1;

		$buttons[]=$this->createPageButton($this->nextPageLabel,$page,$this->nextPageCssClass,!$this->getHasNext(),false);


		return $buttons;

	}


	public function getHasNext()

	{

		return $this->getPages()->getHasNext();

	}


}


class ETopHasNextPagination extends CComponent

{

...

	public function getHasNext()

	{

		return $this->_hasNext;

	}


	public function setHasNext($value)

	{

		$this->_hasNext = $value;

	}

}



Thanks.