FREE CODE: Paging record list.
November 13th, 2008
When listing records from a database you will often need to break those records up into multiple pages, so that your users do not see hundreds of rows at once. What follows is a custom tag which does exactly that.
Parameters
- pageScale - (integer) Default 0. This will limit the number of pages returned depending on the current page. 0 means no scaling will occur.
Example: pageScale=5, startRow=24, pageSize=8, records=64. Given these parameters this tag will return an array of 5 structures. The first page will start with 2 the last page will be 6. There are 8 total pages. - startRow - (integer) Default 1. The first record of the current page.
- pageSize - (integer) Default 20. How many records to list per page.
- records - (integer) Default 0. How many records to page through.
- variable - (string) Default “pages”. The name of the array to create in the caller scope.
Enjoy, it’s free. Until next time, dream in digital.



