Paul:

It might help to take a step back and determine how people will come to this
page in the first place.  perhaps you can use the same mechanism that
provides the link to this page to determine the previous/next pages.

Do these files have entries in a database?  You could then use some sort of
query to determine previous/next (although this may be more intensive than
using CFDIRECTORY).

Do you ever add new files?  If not, consider hard coding the references to
previous/next files.

Are the files/pages heavily traversed?  If so, it may make sense to cache
the whole directory listing in the APPLICATION scope and read from the cache
to dynamically create the previous/next links at each page request.

HTH

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/


> -----Original Message-----
> From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 22, 2003 4:02 PM
> To: CF-Talk
> Subject: Previous/Next with Files
>
>
> I have a directory that can have a small amount or possibly a
> large amount of files (3,000) files.
>
> Here would be an excerpt of the directory:
>
> 10330.cfm
> 10331.cfm
> 10336.cfm
> 10440.cfm
> 10441.cfm
> 10442.cfm
> 10445.cfm etc..
>
> If someone is looking at 10440.cfm, I would like to have two
> links a link to 10336.cfm (previous) and a link to 10441.cfm (next).
>
> I could do a CFdirectory and populate a list with all the file
> names and then look to the before and after the selected file for
> the next/previous, but that seems alittle intensive.
>
> Does anyone have any suggestions on the most efficient way to get
> next/previous files?
>
> Any help would be appreciated!
>
> Paul Giesenhagen
> QuillDesign
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137993
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Reply via email to