I’m searching for a better pagination than default CLinkPager. If it’s possible to done with default Yii base (less modification), then will be even better.
With minimal modification, you can make it look something like this:
[Previous][First][1][2][3]…[10][Last][Next]
There are two approaches:
First, you could modify the pager.css file, which is found in {YiiRoot}/framework/web/widgets/pagers/pager.css, where {YiiRoot} is the installation folder for Yii.
Change the css property for ul.yiiPager .first, ul.yiiPager .last to ‘display: inline’. (This property is around line 67), i.e.
The other approach, is copying the file specified above to another location, modifying it as described, then referencing it using the ‘cssFile’ property for ‘pager’ in the view, e.g.
I need something that will break first part of pagination and then add 3 dots ("…"), and then to display middle section and add numbers around current page like: [7][8][9][10][11], where [9] is current page, and after that to add 3 dots and after them last two page numbers. Here is an example how it looks: hxxp://mis-algoritmos.com/digg-style-pagination-class (just add hxxp with http, since I can’t post links).