Yii Clinkpager显示接下来的3个按钮,最后3个按钮

时间:2016-11-10 16:57:44

标签: php yii

家伙! 我需要一些帮助。我需要在以下视图中显示分页: 1 2 3 ... 98 99 100。 我怎么能在Clinkpager中做到这一点? 我尝试过覆盖方法createButtons,但实际上我不知道什么条件:

   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);
            }



    }

但它不起作用。

0 个答案:

没有答案