[Zope] Re: Newbie: Listing filesystem objects?
Jonothan Farr
jfarr@real.com
Mon, 19 Jun 2000 16:21:31 -0700
> NewbieQ of the moment:
>
> So there's a folder on my server, call it \\server\files\logos. I want
> to list its contents in a drop-down listbox in a form; something like
>
> <select name="logo_filename">
> <option selected value="default.jpg">default.jpg
> <option value="file1.jpg">file1.jpg
> ...
> </select>
>
> Needless to say, I've installed the local filesystem product and
> created a localfs object called "logos" that maps to the correct
> folder. And now I'm mired in the docs. I'm thinking that I can just
> use dtml-in to iterate through the file ids of the objects in that
> folder, but I'm damned if I can see *how* to do that. Any tips?
You can also refer to the DTML with LocalFS how-to at
http://www.zope.org/Members/jfarr/HowTo/DTML_with_LocalFS
I just added a section covering this topic. I will be adding more LocalFS/DTML
examples over the coming weeks.
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998