Alphapager demo

Showing 141-160 of 611 items.
#Last NameFirst NameBornDied
141DolphyEric1928/07/201964/06/29
142DominoFats1928/02/262017/10/25
143Donovan1946/05/10
144DoohanJames1920/03/032005/07/20
145DoornJohnny van1944/11/121991/01/26
146Dos PassosJohn Roderigo1896/01/141970/09/28
147DubuffetJean1901/07/311985/05/12
148DuchampMarcel1887/07/281968/10/01
149Duffy1984/06/23
150DukeGeorge1946/01/122013/08/05
151DunTan1957/08/18
152DurasMarguerite1914/04/041996/03/03
153DuryIan1942/02/122000/03/27
154DylanBob1941/05/24
155DysonFreeman1923/12/152020/02/28
156EastwoodClint1930/05/31
157EcoUmberto1932/01/052016/02/19
158EdisonThomas Alva1847/02/111931/10/18
159EinsteinAlbert1879/03/141955/04/18
160ElliotCass1941/09/191974/07/29

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.