Nathan,

Just check if Cookie.displayselect exists. If it doesn't, simply use
cfdirectory to list the directories, otherwise just output the
cookie.displayselect list (change the delimiters to <br> using
listchangedelims if you want it output in a vertical list).

Pseudo code below should maybe help

On the template used to display the directory list

<cfif isdefined("Cookie.displayselect")>
<cfoutput>#Listchangedelims(cookie.displayselect, ',', '<br>')#</cfoutput>
<cfelse>
<cfdirectory directory="d:\" name="display">
<cfoutput>#display#</cfoutput>
</cfif>

HTH,
Dave

-----Original Message-----
From: FlashGuy [mailto:[EMAIL PROTECTED]]
Sent: 26 September 2002 14:38
To: CF-Talk
Subject: <cfdirectory


The problem I'm having is the text being stored in the cookie could contain
a list of directories separated by commas.

So this <Cfif ListFindNoCase(#COOKIE.DisplaySelect#,#DirectoryName#[i]#)>
would not work, correct?

Wouldn't I have to do a <cfloop somewhere?

So the cookie could contain "temp,work,data". I would want these listed ONLY
and the others ignored.


Where do I come up with these ideas! Argh....

I'm listing the contents of drive "D:\" on the server. Here is an example
listing:

inetpub
temp
work
test
data

I also have a preferences template where the user can type in directories
into a <input> box which would then be saved to a database. The database
would then be
queried and that information dumped to a cookie for that session. The page
would be refreshed and only those directories the user specified in the
<input> box would be
displayed ignoring *everything* else.

I know this can be done but I'm having trouble figuring it out the smarts.


---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------




______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to