chiliec/yii2-pager Pager for Yii2

pagernextlink

Pager Widget for Yii 2

Latest Stable Version Total Downloads Latest Unstable Version License

Quick previous and next links for simple pagination implementations with light markup and styles. It's great for simple sites like blogs or magazines. Based on Bootstrap Pager.

Usage

<?php
    echo \chiliec\pager\Pager::widget([
        'tableName' => $model->tableName(),
        'currentId' => $model->id, // current primary key
        'path' => 'story/view', // path for link
        // optional fields in most cases
        'primaryKey' => 'id', // name of primary key column
        'title' => 'title', // name of title column
        'additional–°ondition' => 'published = 1', // additional SQL-condition
        'cacheTime' => 3600, // time for cache results
        'navOptions' => [],
        'listOptions' => ['class' => 'pager'],
        'prevOptions' => ['class' => 'pull-left', 'rel' => 'prev'],
        'nextOptions' => ['class' => 'pull-right', 'rel' => 'next'],
    ]); 
?>

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist chiliec/yii2-pager "~2.0"

or add

"chiliec/yii2-pager": "~2.0"

to the require section of your composer.json file.

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • 2.001 February 2015
  • 1.001 January 2015

Comments



2.0 is the latest of 2 releases



BSD-3-Clause license
Stats
5 github stars & 2 github forks
0 downloads in the last day
0 downloads in the last 30 days
166 total downloads