Thanks to you both.  This may be academic, but reducing CFDIR calls to as 
few as possible would be prudent, no?  On a small scale performance may not 
suffer, but accessing the HDD can quickly create lag as file sizes and 
numbers grow.

>From: S. Isaac Dealey <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: CF-Talk <[email protected]>
>Subject: Re: CFDIRECTORY - previous & next
>Date: Thu, 23 Jun 2005 18:15:33 -0400
>
>Barney's suggestion should work... as an alternative suggestion, you
>could either use ListFindNoCase() against the cfdirectory's name
>column to locate the current image:
>
><cfset index = ListFindNoCase(ValueList(cfdirectory.name),url.image)>
>
>And then use "index" to locate the next and last images in that
>cfdirectory query.
>
>Or you can pass the index of the image in that query to the page and
>omit the listfindnocase() statement all-together.
>
>When you have the index of an image you can easily get the names of
>the next and last images in the directory using
>cfdirectory.name[index+1] and cfdirectory.name[index-1] or compare
>against cfdirectory.recordcount to know if the current image is the
>last one in the directory.
>
>You do need to make sure you use a sort order in the cfdirectory tag,
>as cfdirectory will produce semi-random results otherwise.
>
>
>s. isaac dealey     954.522.6080
>new epoch : isn't it time for a change?
>
>add features without fixtures with
>the onTap open source framework
>
>http://www.fusiontap.com
>http://coldfusion.sys-con.com/author/4806Dealey.htm
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210453
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to