[Zope] - Questions

Gabe Wachob gwachob@findlaw.com
Tue, 12 Jan 1999 11:59:22 -0800


I have a huge number of questions -- most are due to the fact that the
documentation on the web site seems to have massive holes (or am
I missing something). I take it the documentation is a work-in-progress?

Anyway, I didn't mean to sound so negative. Zope is great, from what I'm
able to do so far.

Let me ask about my current sticking point.

I have a folder that contains some Documents and some Files. The folder
has an index_html Document:

<!--#var standard_html_header-->
<h1><!--#var title--></h1>
<a href="manage">Manage this directory</a><p>
<!--#tree sort=id nowrap=1 branches=objectValues-->
 <a href="<!--#var tree-item-url-->"><IMG border=0 SRC="<!--#var
SCRIPT_NAME
 -->/<!--#var icon-->"></a><!--#var title-->
<!--#var id-->
<!--#/tree-->

<!--#var standard_html_footer-->

Two questions:
1) This works OK, except that File objects have a + (directory expansion
widget) displayed next to them. When you open this up, the directory
underneath the File object is the contents of the very folder that
*contains* the FIle object. The result is you have a recursive
foldering. Why does the File object have this +, and why does it list
the enclosing folder contents?

2) I don't want to list the User Folders (for example). I can test the
name of the folder with <!--#if -->, but I would rather do it by testing
the superclass of the item (if SimpleUserFolder is a superclass of the
item, don't display the item) (the name of the folder may not always be
"User Folder") *or* testing for the isAUserFolder attribute. I have
tried probably a hundred ways of doing this, with absolutely no success.
Most of my attempts cause Zope errors (and despite what the page says,
there is no error information when I look at the source of the page).
How do I reference a class of the Folder object from within the
<!--#tree--> construct?  How do I test if an object has the attribute
isAUserFolder? (hasattr does not work apparently).

More generally, how do I debug this sort of thing? I can't even figure
out *what* the problems I was having was (syntax? object naming?)

    -Gabe