Alphapager demo

Showing 41-52 of 52 items.
#Last NameFirst NameBornDied
41StevensonRobert Louis1850/11/131894/12/03
42StewartPatrick1940/07/13
43Sting1951/10/02
44StipeMichael1960/01/04
45StoneMatt1971/05/27
46StoneOliver1946/09/15
47StrawinskyIgor1882/06/171971/04/06
48StroustrupBjarne1950/12/30
49SutherlandDonald1935/07/172024/06/20
50SutherlandKiefer1966/12/21
51SydowMax von1929/04/102020/03/08
52SzabóIstván1938/02/18

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.