Alphapager demo
Showing 61-80 of 611 items.
# | Last Name | First Name | Born | Died |
---|---|---|---|---|
61 | Brecht | Bertolt | 1898/02/10 | 1956/08/14 |
62 | Breitner | George Hendrik | 1857/09/12 | 1923/06/05 |
63 | Brel | Jacques | 1929/04/08 | 1978/10/09 |
64 | Breuker | Willem | 1944/11/04 | 2010/07/23 |
65 | Brood | Herman | 1946/11/05 | 2001/07/11 |
66 | Brouwer | L.E.J. | 1881/02/27 | 1966/12/02 |
67 | Brown | Arthur | 1942/06/24 | — |
68 | Brown | James | 1933/05/03 | 2006/12/25 |
69 | Brubeck | Dave | 1920/12/06 | 2012/12/05 |
70 | Bruna | Dick | 1927/08/23 | 2017/02/16 |
71 | Bugatti | Ettore | 1881/09/15 | 1947/08/21 |
72 | Bukowski | Charles | 1920/08/16 | 1994/03/09 |
73 | Buñuel | Luis | 1900/02/22 | 1983/07/26 |
74 | Burdon | Eric | 1941/05/01 | — |
75 | Burroughs | William S. | 1914/02/05 | 1997/08/02 |
76 | Bush | Kate | 1958/07/30 | — |
77 | Byrne | David | 1952/05/14 | — |
78 | Calatrava | Santiago | 1951/07/28 | — |
79 | Calder | Alexander | 1898/07/26 | 1976/11/11 |
80 | Cale | J.J. | 1938/12/05 | 2013/07/27 |
Yii2 Alphapager lets you do alphabetic paging in the Yii framework 2.0. On this page it is shown in it's default operation, 'out of the box'.
The relevant code involved is something like this:
<?php use sjaakp\alphapager\ActiveDataProvider; use sjaakp\alphapager\AlphaPager; $query = Person::find()->orderBy('last_name, first_name'); $dataProvider = new ActiveDataProvider([ 'query' => $query, 'alphaAttribute' => 'last_name', ]); ?> <?= AlphaPager::widget([ 'dataProvider' => $dataProvider, ]) ?> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'last_name:ntext', 'first_name:ntext', 'born:date', 'died:date', ], ]); ?>
A slightly more advanced example is here.