Usually I think of a pagination control like this, with optional parts:
|< < 1 ... 6 7 _8_ 9 10 ... 20 > >|
|<
- jump to first page. Disabled when on the first page.<
- previous page. Disabled when on the first page.1
- initial bookend page(s).- first
...
- may show as an ellipsis or expand automatically into numbers if below a certain number of pages 6 7
- pre "focus" pages._8_
- "focused" page.9 10
- post-"focus" pages.- second
...
- may show as an ellipsis or expand automatically into numbers if below a certain number of pages >
- next page. Disabled when on the last page.>|
- jump to last page. Disabled when on the last page.
The configuration settings are:
-
aroundCurrentCount
- this determines the number of "focus" entries. For page 8 with this setting at 2:6 7 _8_ 9 10
-
bookendPageCount
- how many to show at the beginning or end of the total number of pages before cutting to an ellipsis. With this setting at 2:1 2 ... ... 120 121
-
ellipsisMinimumCount
- if there are at least this many pages included in between "focus" and "bookend" sections, show an ellipsis instead. With this setting at 3, and the previous settings at 2, you would get:1 2 3 4 5 6 _7_ 8 1 2 ... 6 7 _8_
-
bookendFocusCount
- if the focus is close to the bookend, make sure at least this many pages are shown. With this settings of aroundCurrentCount=2, bookendPageCount=1, ellipsisMinimumCount=2, and bookendFocusCount=5, you would get:_1_ 2 3 4 5 ... 9 1 2 _3_ 4 5 ... 9 1 2 3 _4_ 5 6 ... 9