To manage displaying lists of recordings contained in a database,
Joomla proposes the mosPageNav class. This one makes it possible to
define terminals, the limits between which the results of a request on
the database will be displayed.
Attributes:
An object of the class mosPageNav is defined by 3 values:
* $total: the total number of recordings turned over by the request,
* $limitstart: the number of recordings from which to begin posting,
* $limit: the number of recordings to be displayed.
Methods:
The function writeLimitBox will make it possible
to modify the number of lines to be displayed. With the screen, we will
have a selectlist in which you will have to choose a new value. We
will modify thus the contents of the variable $limit.
The function writePagesCounter allows to display the numbers of recordings to the screen.
ie : Results 1 - 10 of 54
The function writeLeafsCounter looks like the preceding method, except that it does not make possible to indicate the
numbers of recordings, but the numbers of page.
The function writePagesLinks displays the list of the numbers of
page, with links, but also with links to previous and next page, first and last page.
Note:
The length by default of the lists is defined in
the global configuration of the site. We recover this value with
the aggregate variable $mosConfig_list_limit.
|