[Zope] LocalFS - how to display objects?

Mark Langkau mark.langkau@pbmplus.com
Fri, 29 Jun 2001 07:49:04 -0500


Hi,

I'd like to display folders and files in a LocalFS object as a list of
links (NOT using the default display method form LocalFS), where I can
click on a folder to see more files, or click on a file and have it
displayed. Files will be either html or pdf files. I also want to use a
dtml method called index_html to display this.

Here's the usual way I do this with standard Zope objects:

<dtml-var standard_html_header>
<ul>
<dtml-in expr="objectValues(['Folder', 'File'])">
    <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></li>
</dtml-in>
</ul>
<dtml-var standard_html_footer>


How do I enhance this to "also" work with LocalFS objects that will be
nested inside regular Zope folders? I see that in LocalFS objectValues
become fileValues, and I can get them to be listed, but I can't seem to
turn that into a list of hyperlinks. A code snippet from someone who is
doing this would be great!

We will be uploading lots of files via ftp to the Zope server. We
briefly looked at ExtFile, and like the idea, but didn't see how to
create an ExtFile object via ftp upload. A remote server will create a
file and automatically via cron ftp it to the Zope server to the local
filesystem to be used via LocalFS. Is there a way to do this with
ExtFile without human intervention? ;-)

Of course, I have to do this in a hurry so I'm probably reading right
past the obvious answer in the docs. I just can't seem to put it
together this morning ;-)

Thanks,
Mark