Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Latest commit

 

History

History
94 lines (68 loc) · 2.87 KB

readme.wiki

File metadata and controls

94 lines (68 loc) · 2.87 KB

The Lithium pagination plugin (Li3 Paginate) is a helper designed to make the pagination of records easier within the Lithium framework.

      1. Requirements
In order to make use of this plugin as is, you will need to include or allow a specific route in `\app\config\routes.php`. However you decide to do this, you will be required to include the `:controller`, `:action` and `:page` slugs.

You may also be required (if you're lazy like me) to either extend the plugin:

      1. Possibly a bad idea ...
Alternatively you could include this plugin directly in your `\app\config\bootstrap\libraries.php`:

You will also be required to configure your controller action such that the following 3 variables are set namely: `$limit`, `$page` and `$total` as explained below.

      1. View / Template
Now all you have to do to make use of the standard paginator class within your templates/views is:

      1. Advanced Settings & Overrides
It's possible to override configuration setting options like so:

Note: The configuration options are sticky so once set it will apply to all paginate method calls.

If you want to specify an opening and closing tag for each paginate element it can be defined insdie Paginator.php

Custom URLs can be configured by setting the controller and action settings like so:

will force the generated url to /foo/bar/page:1

Enjoy. Peace.