forked from pods-framework/pods
-
Notifications
You must be signed in to change notification settings - Fork 0
Pagination()
bonsak edited this page Nov 20, 2012
·
1 revision
Display the pagination controls, types supported by default are simple, paginate and advanced. The base and format parameters are used only for the paginate view.
public function pagination (
$params = null
)
Parameter | Type | Details |
---|---|---|
$params | array | Associative array of parameters |
Option | Type | Default | Details |
---|---|---|---|
type | string | advanced | Pagination style to use: advanced, simple, paginate |
label | string | Go to page: | Label text to appear next to pagination |
show_label | boolean | true | Whether to show the label text |
first_text | string | « First | Text for the First page |
prev_text | string | ‹ Previous | Text for the Previous page |
next_text | string | Next › | Text for the Next page |
last_text | string | Last » | Text for the Last page |
prev_next | boolean | true | Whether to show the Previous and Next text |
first_last | boolean | true | Whether to show the First and Last text |
limit | int | $this->limit | Items per page, inherited by anything run by find() |
page | int | $this->page | Current page number |
mid_size | int | 2 | How many numbers to either side of current page, but not including current page |
end_size | int | 1 | How many numbers on either the start and the end list edges |
total_found | int | $this->total_found() | Total items across all pagination |
page_var | string | $this->page_var | Pagination variable to use in URL |
base | string | {$url}{$append}%_% | Pagination Base URL |
format | string | {$this->page_var}=%#% | Pagination Format |
(string) Pagination HTML
2.0+
pagination() is located in /pods/classes/Pods.php