Alphapager demo

Showing 41-53 of 53 items.
#Last NameFirst NameBornDied
41MoonKeith1946/08/231978/09/07
42MooreHenry1898/07/301981/08/31
43MoorePatrick1923/03/042012/12/09
44MooreRoger1927/10/142017/05/23
45MoraviaAlberto1907/11/281990/09/26
46MorriconeEnnio1928/11/102020/07/06
47MorrisonJim1943/12/081971/07/03
48MorrisonVan1945/08/31
49MozartWolfgang Amadeus1756/01/271791/12/05
50MurakamiHaruki1949/01/12
51MurphyCillian1976/05/25
52MusilRobert1880/11/061942/04/15
53MuybridgeEadweard1830/04/091904/05/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.