Controller
pagination()
Signature
Section titled “Signature”pagination() — returns struct
Available in: controller, model, migrator, migration, tabledefinition
Category: Pagination Functions
Description
Section titled “Description”Returns a struct with information about the specificed paginated query.
The keys that will be included in the struct are currentPage, totalPages and totalRecords.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
handle | string | no | query | The handle given to the query to return pagination information for. |
Examples
Section titled “Examples”allAuthors = model("author").findAll(page=1, perPage=25, order="lastName", handle="authorsData");
paginationData = pagination("authorsData");
#pagination().currentPage#
#pagination().totalPages#
#pagination().totalRecords#