Alphapager demo

Showing 21-40 of 48 items.
#Last NameFirst NameBornDied
21ChubbyPopa1960/03/31
22CleeseJohn1939/10/27
23ClintonBill1946/08/19
24CockerJoe1944/05/202014/12/22
25CoetzeeJ.M.1940/02/09
26CohenLeonard1934/09/212016/11/07
27Cohn-BenditDaniel1945/04/04
28ColtraneJohn1926/09/231967/07/17
29ConnerySean1930/08/252020/10/31
30ConwayJohn1937/12/262020/04/11
31CooderRy1947/03/15
32CopernicusNicolaus1473/02/101543/05/14
33CoppolaFrancis Ford1939/04/07
34CorbusierLe1887/10/061965/08/27
35CoreaChick1941/06/122021/02/09
36CostelloElvis1954/08/25
37CouplandDouglas1961/12/30
38CowardNoël1899/12/161973/03/26
39CoyneKevin1944/01/272004/12/02
40CranstonBryan1956/03/07

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.