Download the PHP package faurelia/t2-simple-pagination without Composer
On this page you can find all versions of the php package faurelia/t2-simple-pagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download faurelia/t2-simple-pagination
More information about faurelia/t2-simple-pagination
Files in faurelia/t2-simple-pagination
Package t2-simple-pagination
Short Description A simple PHP pagination (with Bootstrap 3 example)
License MIT
Homepage https://github.com/faurelia/t2-simple-pagination
Informations about the package t2-simple-pagination
T2 Simple Pagination
A Simple PHP Pagination library (with Bootstrap 3 example)
Installation
Usage
Initialize T2SimplePagination
providing the 2 required parameters, total
and page
as well as additional settings.
Then extract the records by using the offset
and per_page
properties.
See the class Properties below for more details.
Page Links
Pager (Next and Prev Links)
You may want to hide the pagination links when there is only one page, so it is recommended to enclose the above codes inside this if block:
For Bootstrap 3 example, please check the index.php file included in this repository.
Properties
Variables | Description |
---|---|
total | the total number of records to be paginated |
page | the current page, default: 1 |
per_page | the number of items to display per page, default: 10 |
num_page | the total number of pages |
offset | the current record pointer |
next_page | the next page if page is not equals to num_page |
prev_page | the previous page if page is not 1 |
range | the number of page links to display, default: 5 (Note: Use ODD numbers only!) |
min_page | the start page in the page links |
max_page | the end page in the page links |
License
This library is distributed under MIT License. © 2017 Fatima Aurelia