[Zope] Re: Tree tags using LocalFS objects
Jonothan Farr
jfarr@real.com
Mon, 1 May 2000 19:28:37 -0700
There are some known problems with the branches_expr attribute to the tree tag,
although I'm not really sure about the details. I'm not sure why you would need
to use it in this case, though. The following DTML code works and seems to do
what you're trying to accomplish:
<dtml-tree name=folder>
<dtml-if icon>
<IMG SRC="<dtml-var icon>" BORDER=0>
</dtml-if>
<A HREF="<dtml-var tree-item-url>"><dtml-var id></A>
</dtml-tree>
There are some definite performance issues with using the tree tag and LocalFS
objects. Not to worry, this is at the top of my todo list.
-jfarr
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi! I'm a signature virus.
Copy me into your .sig to join the fun!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----- Original Message -----
From: Eric Shuman <eshuman@outrider.com>
To: <zope@zope.org>
Sent: Thursday, April 27, 2000 1:25 PM
Subject: [Zope] Tree tags using LocalFS objects
> Thanks for the tip on the LocaFS product. Definitely a very cool addition!
>
> Here is my current floundering. I am trying to get a tree of a LocalFS
> object "folder", but I seem to be getting odd behavior from the tree that
> gets displayed. (Branches won't open, or open sporadically, and when they
> do open it is just a repeat of the original tree. Also they don't always
> open under the branch that was clicked on but in other locations.) Here is
> the code:
>
> <dtml-tree name=folder branches_expr=fileValues()>
> <dtml-if "meta_type=='Folder'">
> <IMG SRC="<dtml-var icon>" BORDER=0>
> <b><dtml-var id></B>
> <dtml-else>
> <IMG SRC="<dtml-var icon>" BORDER=0>
> <A HREF="<dtml-var tree-item-url>"><dtml-var id></A>
> </dtml-if>
> </dtml-tree>
>
> If I call a Zope object and use objectValues() for my branch expression
> everything works fine. It seems that the id's are not getting set
> correctly and that "meta_type" is not a valid object property for LocalFS
> objects. I am not very familiar with the LocalFS objects. What am I
> missing?