[Zope-CMF] LocalFS and IEeditor...

larry_prikockis@NatureServe.org larry_prikockis@NatureServe.org
Tue, 11 Dec 2001 18:01:51 -0500


Hi... I'm using S. Babu's ieeditor script
(vsbabu.org/webdev/zopedev/ieeditor.html) on a site where a large collection
of documents and images are stored on the filesystem and accessed using the
LocalFS product.  

Both of these products work perfectly on their own... however, not being
content with things as they are, I need to get the ieeditor function that
allows a user to select and image or a link to traverse the items in the
LocalFS object...

Here's where it gets messy.  The portion of editor_browse_images.html (and
similarly for editor_browse_files...) that creates the tree:

<dtml-tree  branches_expr="objectValues(['Local File System', 'Portal
Folder', 'Folder', 'Image'])" nowrap=1 sort=id>
  <dtml-if "_['id'] != 'list.html' and _['id'] != 'list.inc'">
  <IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>">
<dtml-if "meta_type=='Image'">
  <A HREF="#"
onClick="top.document.forms[0].elements['ImgUrl'].value=top.document.PREVIEW
PIC.src='<dtml-var absolute_url>';<dtml-if
title>top.document.forms[0].elements['AltText'].value='<dtml-var
"_.string.replace(title,'\'','\\\'')"
html_quote>';</dtml-if>top.document.forms[0].elements['ImgHeight'].value='<d
tml-var
"getProperty('height')">';top.document.forms[0].elements['ImgWidth'].value='
<dtml-var "getProperty('width')">';"><dtml-var id><dtml-if title> (<dtml-var
title size="30" html_quote>)</dtml-if></a>
<dtml-else>
 <dtml-var id><dtml-if title> (<dtml-var title size="30"
html_quote>)</dtml-if>
</dtml-if>
  </dtml-if>
</dtml-tree>

...doesn't traverse the items in the LocalFS object (since they have
fileValues, fileIds and fileItems instead of the corresponding "object"
parameters).  I've had no luck in modifying the <dtml-tree> section to
properly work with file system objects... though it *seems* that this ought
to be quite do-able.  

I'm wondering if anyone has tackled this...

any thoughts?

thanks!
Larry

+
Larry J. Prikockis
Internet Systems Specialist, NatureServe
Voice:703-908-1833 / Fax:703-908-1917 /
Email:larry_prikockis@NatureServe.org
www.NatureServe.org
+
All programmers are optimists. Perhaps this modern sorcery especially
attracts those who believe in happy endings and fairy godmothers. Perhaps
the hundreds of nitty frustrations drive away all but those who habitually
focus on the end goal. Perhaps it is merely that computers are young,
programmers are younger, and the young are always optimists. But however the
selection process works, the result is indisputable: "This time it will
surely run," or "I just found the last bug."
-- Frederick P. Brooks, Jr., The Mythical Man Month