CLinkPager links


Is there a way to make the CLinkPager to show “< previous 1 2 3 … 19 20 21 next >” instead of “< previous 1 2 3 4 5 6 7 8 9 10 next >” ? have been searching alot but can’t really find anything for it :confused:

maybe you have to extend the CLinkPager . read the source and you can override the method createPageButtons


Do I have to override the createPageButtons function? Isn’t there anything like an option in htmlOptions? :(

I think yiqing95 is right. You need to create your own class, extend CLinkPager and override createPageButton. Don’t think you can achieve that any other way


Just realized I pretty much repeated what yiqing95 lol

If you mean count of Link pages show in pagination, you can set maxButtonCount in CLinkPager like :

$this->widget('CLinkPager', array(

                    'pages' => $pages,

                    'maxButtonCount' => 21,