Hopefully someone can help me out on this .... Premise: Create a method of displaying files (in browser with URL linking) from a Local File System in Zope that can be traversed. I have already installed the LocalFS product and it seems to work fine, as least for the first level of file/folders. But I need to be able to traverse down an infinite (well a lot) number of directories so that users can select a specific file. Like I said the first level is easy since I am in the "Zope Environment", but I can not figure out how to keep traversing the path (URL Link) once I have moved out of the Zope system and into the LocalFS. I have been unable to add a DTML file in the LocalFS to load the next level, or at least I can't figure out how. -------------------------------------------------------- <dtml-var standard_html_header> <dtml-in "Files.fileIds()"> <a href="&dtml-absolute_url;/Files/<dtml-var sequence-item>"><dtml-var sequence-item></a><br> </dtml-in> <dtml-var standard_html_footer> ------------------------------------------------------- ROOT . . - index_html (dtml method) . . - Files (LocalFS Link) . . . . - 2001_Information (Folder in LocalFS) . . . . . . - file1 . . . . . . - file2 . . . . - 2002_Information (Folder in LocalFS) . . . . - etc. I am trying to build a traversable webpage with a URL links to file1 and file2 dynamically using the LocalFS and starting from Zope. I have also tried the dtml-tree object (which does traverse the entire paths) but it is too slow in building the pages. Given time I think I could figure out something and make it work, but I need to get this working in a hurry to help justify using Zope, and this is my last roadblock. Any and all help would be greatly appreciated. Win 2000 system running ZOPE 2.6.1 LocalFS 1-0-0 mounting a shared nt filesystem Sorry if this is old stuff. I am fairly new to Zope. Thanks Tracey Monroe
Premise: Create a method of displaying files (in browser with URL linking) from a Local File System in Zope that can be traversed.
I have already installed the LocalFS product and it seems to work fine, as least for the first level of file/folders. But I need to be able to traverse down an infinite (well a lot) number of directories so that users can select a specific file. Like I said the first level is easy since I am in the "Zope Environment", but I can not figure out how to keep traversing the path (URL Link) once I have moved out of the Zope system and into the LocalFS. I have been unable to add a DTML file in the LocalFS to load the next level, or at least I can't figure out how.
...
Digging out an old tree-walker experiment: This is in a ZPT named 'recurse' somewhere above whatever you want to list:: <ul> <li tal:repeat="item here/objectValues"> <span tal:content="item/getId" tal:omit-tag="">An object</span> : <span tal:content="item/title" tal:omit-tag="">A title</span> <span tal:condition="python:item.meta_type=='Folder'" tal:content="structure item/recurse">A Folder listing</span> </li> </ul> It can be used like:: <div tal:replace="structure here/recurse">ASDF</div> It's not DTML, I know, but you should be able to either deal with the ZPT or translate it, as it's not that complex. I haven't tried it on LocalFS, but so long as it uses objectValues to list its objects (and I'm pretty sure it does) everything should work fine. You may have to change the meta_type in the condition if LocalFS doesn't use Folder (though, again, I think it does.) --jcc
This may help. http://www.zope.org/Members/jfarr/HowTo/DTML_with_LocalFS Reading the code helps too :-) On Fri, 25 Apr 2003, J Cameron Cooper wrote:
Premise: Create a method of displaying files (in browser with URL linking) from a Local File System in Zope that can be traversed.
I have already installed the LocalFS product and it seems to work fine, as least for the first level of file/folders. But I need to be able to traverse down an infinite (well a lot) number of directories so that users can select a specific file. Like I said the first level is easy since I am in the "Zope Environment", but I can not figure out how to keep traversing the path (URL Link) once I have moved out of the Zope system and into the LocalFS. I have been unable to add a DTML file in the LocalFS to load the next level, or at least I can't figure out how.
...
participants (3)
-
Dennis Allison -
J Cameron Cooper -
tracey.monroe@philips.com