Alphapager demo

Showing 21-40 of 611 items.
#Last NameFirst NameBornDied
21AsimowIsaac1920/01/021992/04/06
22AttenboroughDavid1926/05/08
23AznavourCharles1924/05/222018/10/01
24BacallLauren1924/09/162014/08/12
25BachJohann Sebastian1685/03/211750/07/28
26BaconFrancis1909/10/281992/04/28
27BadalamentiAngelo1937/03/222022/12/11
28BakerJosephine1906/06/031975/04/12
29BardotBrigitte1934/09/28
30BargeldBlixa1959/01/12
31BarkinEllen1954/04/16
32BarrettSyd1946/01/062006/07/07
33BasieCount1904/08/211984/04/26
34BatailleGeorges1897/09/101962/07/10
35BauschPina1940/07/272009/06/30
36BeauvoirSimone de1908/01/091986/04/14
37BecketSamuel1906/04/131989/12/22
38BeefheartCaptain1941/01/152010/12/17
39BelafonteHarry1927/03/012023/04/25
40BelmondoJean-Paul1933/04/092021/09/06

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.