the pagination API has 3 params: the limit (upper limit), limitstart (lower limit), and count (total count of records)
To get the value of limit:
[code:1]
$limit = intval( $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit ) );
[/code:1]
To get the value of limitstart
[code:1]
$limitstart = intval( $mainframe->getUserStateFromRequest( "view{$option}limitstart", 'limitstart', 0 ) );
[/code:1]
To get the value of count, do a SELECT COUNT on the table that keeps the records that you wish to paginate.
You will also need to call pageNavigation.php by:
[code:1]
require_once( $mosConfig_absolute_path . '/administrator/includes/pageNavigation.php' );
[/code:1]
Then create the paging object:
[code:1]
$pageNav = new mosPageNav( $total, $limitstart, $limit );
[/code:1]
To select the records to display, do the usual select statement and include "LIMIT $limitstart, $limit".
To output the Display # dropdown menu you see in some components admin backend:
[code:1]
<?php echo $pageNav->getListFooter(); ?>[/code:1]