Hello, I’m a jr. CF programmer trying to figure out how to create sets of multipages. What I want to do is create page sets of 10 and have an arrow link, which would jump you to the next 10 pages. The page selected would be the first number of the set, for example you have pages 1-10 then click the arrow and go to set 11-20. The page selected would be 11. I have no idea how to even attempt this task. Any input and/or suggestions would be more than appreciated. Thanks -Rebekah

Here's one way (from CFMX manual, pages 468-469):

<CFQUERY DATASOURCE="your_db" NAME="GetLinks">
SELECT link, link_ID FROM your_table
</CFQUERY>
<cfparam NAME ="MaxRows" default="10">
<cfparam NAME ="StartRow" default="1">
<CFOUTPUT QUERY="GetLinks" startrow="#StartRow#" maxrows="#MaxRows#">
#GetLinks.currentRow# --- #link#<BR>
</CFOUTPUT>
<CFIF (StartRow+MaxRows) LTE GetLinks.recordcount>
<a href="your_filename.cfm?StartRow=<cfoutput>#evaluate(StartRow+MaxRows)#</cfoutput>"><img src="/images/arrow.gif></a>
</CFIF><br>
<a href="your_filename.cfm?StartRow=1">Reset counter</a>

(too easy, so I decided to fill it out - just copy & paste; change MaxRows to output different number of records)

hi,
did you ever figure this one out or am i missing something in the posts below? as far as i can tell the replies u hd were pretty useless?
any ideas MUCH appreciated....
cheers
jon

Hello, I’m a jr. CF programmer trying to figure out how to create sets of multipages. What I want to do is create page sets of 10 and have an arrow link, which would jump you to the next 10 pages. The page selected would be the first number of the set, for example you have pages 1-10 then click the arrow and go to set 11-20. The page selected would be 11. I have no idea how to even attempt this task. Any input and/or suggestions would be more than appreciated. Thanks -Rebekah

This article has been dead for over six months. Start a new discussion instead.