Sure, just change your loop parameters - instead of showing the numbers for all of the pages of data determine how many numbers you'll show. Check to see if you have records for all those pages, and loop to your "num of records" + 1, using the plus one as your "next" var.
On 4/12/07, Steve LaBadie wrote: > I have page navigation that shows the number of pages of a search > results; 25 per page (Example: Page 1 2 3 4 5 6 7 Show All). Is there a > way to condense the numbers like the way Google does it so I don't have > 50 numbers going across the page? > > > > Page 1 2 3 4 5 6 7 8 9 10 Show All > > Previous 10 11 12 13 14 15 16 17 18 19 20 > > And so on > > > > My code is: > > > > <cfset ThisPage = 1> > > <!--- Loop thru row numbers, in increments of RowsPerPage ---> > > <cfloop from="1" to="#TotalRows#" step="#RowsPerPage#" index="PageRow"> > > <!--- Detect whether this "Page" currently being viewed ---> > > <cfset IsCurrentPage = (PageRow GTE URL.StartRow) AND (PageRow LTE > EndRow)> > > > > <!--- If this "Page" is current page, show without link ---> > > <cfif IsCurrentPage> > > <cfoutput><strong>#ThisPage#</strong></cfoutput> > > <!--- Otherwise, show with link so user can go to page ---> > > <cfelse> > > <cfoutput> > > <a href="#CGI.SCRIPT_NAME#?StartRow=#PageRow#">#ThisPage#</a> > > </cfoutput> > > </cfif> > > > > <!--- Increment ThisPage variable ---> > > <cfset ThisPage = ThisPage + 1> > > </cfloop> > > Steve LaBadie, Web Manager > East Stroudsburg University > 200 Prospect St. > East Stroudsburg, Pa 18301 > 570-422-3999 > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > http://www.esu.edu <http://www3.esu.edu> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275072 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

