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> 

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275069
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to