Alphapager demo

Showing 21-34 of 34 items.
#Last NameFirst NameBornDied
21ToporRoland1938/01/071997/04/16
22Toulouse-LautrecHenri de1864/11/241901/09/09
23TournierMichel1924/12/192016/01/18
24ToussaintAllen1938/01/142015/11/10
25TownshendPete1945/05/19
26TravenB.1892/05/031969/03/27
27TrierLars von1956/04/30
28TrintignantJean-Louis1930/12/112022/06/17
29TrumboDalton1905/12/091976/09/10
30TucholskyKurt1890/01/091935/12/21
31TuringAlan1912/06/231954/06/07
32TurnerTina1939/11/262023/05/24
33TwainMark1835/11/301910/04/10
34TzaraTristan1896/04/041963/12/24

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.