Yii 2.0: YII2 Pagination Options

1 follower

Worry about pagination option...

solution here If we are using default pagination option like

<< 1 2 3 4 5 6 >>

but if u want to customize you need to put in your view page

step1

use yii\helpers\Html;
use yii\widgets\LinkPager;

step2 :

<?= LinkPager::widget(['pagination' => $pagination,'lastPageLabel'=>'LAST','firstPageLabel'=>'FIRST',
    'prevPageLabel' => 'Prev',
    'nextPageLabel' => 'Next',
 
    ]) ?>

I hope this will help to you in your yii2 projects.

Be the first person to leave a comment

Please to leave your comment.

Write new article
  • Written by: VivekYii
  • Category: Tips
  • Yii Version: 2.0
  • Votes: +1 / -1
  • Viewed: 8,136 times
  • Created on: Jan 28, 2015
  • Last updated: never
  • Tags: pagination, View, vivs