[RecordPaging plugin]: Convert plugin to module

11 views
Skip to first unread message

Ancient Programmer

unread,
Dec 14, 2016, 5:19:24 PM12/14/16
to ColdBox Platform
I converted RecordPaging (https://www.forgebox.io/view/RecordPaging) from plugin to module. In case anyone is interested in, I attached the code (sorry, old way). I tested it and seemed to be working as intended.

Extract and drop the cbpaging folder into /modules.

In ColdBox settings,

paging = {
pagingMaxRows = 10,
pagingBandGap = 5
};


In the handler,

paging = getModel("Paging@cbpaging");
rc.boundaries = paging.getBoundaries();


In the view,

<cfset foundRows = 1000 />
<cfset link = "index.cfm?event=test.paging&page=@page@" />

<cfoutput>
#getModel("Paging@cbpaging").renderIt(foundRows, link)#
</cfoutput>


More explanations can be found at https://www.forgebox.io/view/RecordPaging


I hope this is useful.

cbpaging.rar
Reply all
Reply to author
Forward
0 new messages