Most components handle and display itemized data. Itemized data is data having many instances; most commonly this reflects rows in a database table. When dealing with itemized data there are three areas of functionality that users generally expect:
Pagination
Ordering
Filtering and searching
In this section we will discuss each of these areas of functionality and how to implement them in the backend of a component.
To
make large amounts of itemized data easier to understand, we can split the data across multiple pages. Joomla! provides us with the JPagination
class to help us handle pagination in our extensions.
There are four important attributes associated with the JPagination
class:
limitstart
: This is the item with which we begin a page, for example the first page will always begin with item0
.limit
: This is the maximum number of items to display on a page.total
: This is the total number of items across all the pages._viewall
: This is the option to ignore pagination...