php - Yii Clinkpager displays next 3 buttons and last 3 -
guys! need help. need display pagination in following view: 1 2 3 ... 98 99 100. how can in clinkpager? have tried override method createbuttons, don't know conditions :
for($i=$beginpage;$i<=$endpage;++$i){ if($this->maxbuttoncount < $pagecount){ $next = $currentpage + 3; if($currentpage <= $next || $currentpage >= $pagecount-3){ $buttons[]=$this->createpagebutton($i+1,$i,$this->internalpagecssclass,false,$i==$currentpage); } }else{ $buttons[]=$this->createpagebutton($i+1,$i,$this->internalpagecssclass,false,$i==$currentpage); } }
but not work.
Comments
Post a Comment