FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

RecordPaging

v2.0 Plugins
 A paging plugin.
   
To use this plugin you need to create some settings in your coldbox.xml and some
css entries.

COLDBOX SETTINGS
- PagingMaxRows : The maximum number of rows per page.
- PagingBandGap : The maximum number of pages in the page carrousel

CSS SETTINGS:
.pagingTabs - The div container
.pagingTabsTotals - The totals
.pagingTabsCarrousel - The carrousel

To use. You must use a "page" variable to move from page to page.
ex: index.cfm?event=users.list&page=2

In your handler you must calculate the boundaries to push into your paging query.

<cfset rc.boundaries = getMyPlugin("paging").getBoundaries()>

Gives you a struct:
[startrow] : the startrow to use
[maxrow] : the max row in this recordset to use.
Ex: [startrow=11][maxrow=20] if we are using a PagingMaxRows of 10

To RENDER:
#getMyPlugin("paging").renderit(FoundRows,link)#

FoundRows = The total rows found in the recordset
link = The link to use for paging, including a placeholder for the page @page@
ex: index.cfm?event=users.list&page=@page@
Drop in your plugins folder or coldbox extensions location
2.0
  • Fixes to pagination on next screens
  • Updates to use default values for settings: Paging Max Rows = 20 and Paging Band Gap = 5

$ box install RecordPaging

No collaborators yet.
 
5.00 / 4
  • {{ getFullDate("2009-12-02T18:43:28Z") }}
  • {{ getFullDate("2016-06-10T02:42:59Z") }}
  • 12,949
  • 5,020