I usually do that by having a couple of variables:
page -> the current page you're on (from URL)
pagesize -> the number of items on a page (hardcode/from URL)
recordcount -> the total number of results (from your query)
You can then work out things like the total number of pages (the ceiling
function is to round the number of pages up to the closest integer) :
<cfset pagecount = ceiling(recordcount / pagesize)>
And then loop from 1 to pagecount and print out a number and link each
time:
<cfloop from="1" to="#pagecount#" index="curpage">
<a href=""> </cfloop>
HTH,
Tim.
-------------------------------------------------------
<CF_CodingContest mode="judging" newentries="false">
Maze Solver - http://tech.badpen.com/cfcontest/
-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

