This is an extremely simple extension that is combining both CListPager and CLinkPager in one, allowing your users to select page of CGridView they want to go to by either clicking on a page button (CLinkPager) or selecting page from a drop down list (CListPager).
Please note: This extension was created for a specific purpose, not for a public domain, so you might find some changes in its code that do not necessary will suit your needs. There are some fixes to some things in base classes that I found wrong (for example - making disabled buttons by only changing their class, but still allowing user to click them), but you may disagree with me. In that case, fill free to drop any additional code out of original extension.
There are some Polish texts hardcoded into this extension. You need to throw them away or change them to use Yii:t for translating purposes. I know that this is a very bad manner and sorry that I wasn't able to do this myself, but I haven't got enough time for doing this when developing this extension.
Unfortunately, do to above circumstances, symbol used to separate CLinkPager from CListPager (mdash) is also hardcoded, you have to change it manually.
Since this is a descent from a standard paging class, you do need only framework, even with a very old version of it.
This is a standard paging component so to use it in a very base manner, all you have to do, is to extend your CGridView configuration with the following line:
Yii, of course must be informed to load proper extension, so you can either add a line like this before your CGridView widget definition:
(providing correct path to the place, where you unpacked this extension.
This is a good approach, if you are using only one or just a few CGridViews with this paging component. If tyou have them more, it is better to force Yii to autoload this extension upon startup by adding following line to your application configuration:
//Autoloading model and component classes 'import'=>array ( 'application.models.*', 'application.components.*', 'application.extensions.*', 'ext.LinkListPager.LinkListPager' ),
Since this extension descents from CLinkPager, you can use with it any configuration, you would normally use with CLinkPager. For example:
'pager'=>array ( 'class'=>'LinkListPager', 'maxButtonCount'=>25, 'header'=>'' )
Fill free to contact me or leave a comment here, if you have any question related to this extension.