Alphapager demo
Showing 181-200 of 611 items.
# | Last Name | First Name | Born | Died |
---|---|---|---|---|
181 | Ferreri | Marco | 1928/05/11 | 1997/05/09 |
182 | Ferry | Bryan | 1945/09/26 | — |
183 | Fields | W.C. | 1880/01/29 | 1946/12/25 |
184 | Fignon | Laurent | 1960/08/12 | 2010/08/31 |
185 | Fimmel | Travis | 1979/07/15 | — |
186 | Fincher | David | 1962/05/10 | — |
187 | Finney | Albert | 1936/05/09 | 2019/02/07 |
188 | Fleming | Ian | 1908/05/28 | 1964/08/12 |
189 | Fo | Dario | 1926/03/24 | 2016/10/13 |
190 | Fogerty | John | 1945/05/28 | — |
191 | Fokker | Anthony | 1890/04/06 | 1939/12/23 |
192 | Franklin | Aretha | 1942/03/25 | 2018/08/16 |
193 | Franssens | Jean-Paul | 1938/02/05 | 2003/06/19 |
194 | Franzen | Jonathan | 1959/08/17 | — |
195 | Freud | Lucien | 1922/12/08 | 2011/07/21 |
196 | Freud | Sigmund | 1856/05/06 | 1939/09/23 |
197 | Frost | David | 1937/04/07 | 2013/08/31 |
198 | Fry | Stephen | 1957/08/24 | — |
199 | Fuller | Richard Buckminster | 1895/07/12 | 1983/07/01 |
200 | Galilei | Galileo | 1564/02/05 | 1642/01/08 |
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.