Skip to content

Instantly share code, notes, and snippets.

View yasirrose's full-sized avatar

Yasir Shaukat yasirrose

  • Lahore
View GitHub Profile
@yasirrose
yasirrose / pagination.cfm
Created April 1, 2021 11:14 — forked from steinbring/pagination.cfm
How to do pagination within ColdFusion This is an example of how to handle pagination in ColdFusion. This simple example can be manipulated by changing the values of the four variables at the top of the file.
<!--- How many pages should you link to at any one time? --->
<cfset intPagesToLinkTo = 5>
<!--- How many items are you displaying per page? --->
<cfset intItemsPerPage = 10>
<!--- How many items do you need to display, across all pages. --->
<cfset intNumberOfTotalItems = 100>
<!--- What is the current page you are on? --->
<cfif isdefined("url.page")>
<cfset intCurrentPage = val(url.page)>
<cfelse>