[Zope] Strange Tree Error

John Goerzen jgoerzen@complete.org
05 Sep 1999 11:32:06 -0500


Hi,

I have a tree set up for use as my site map.  I wanted to add Expand
All and Collapse All features, which are no problem to add; the
documentation covers them quite nicely.  My Collapse All button works
fine.  The tree works fine, too, and everything can be expanded.
However, the Expand All link doesn't work; it gives an error:

Error Type: KeyError
             Error Value: branches

And claims that something is referencing the non-existant branches.

Here is my code.  Any suggestions welcome!

<A HREF="<dtml-var id>?expand_all=1">Expand All</A> |
<A HREF="<dtml-var id>?collapse_all=1">Collapse All</A>
<P>
<!--#tree
  expr="PARENTS[0]"
  skip_unauthorized=1 sort=title_or_id
  branches_expr="objectValues(['Folder', 'DTML Document'])"
  -->
<dtml-if "id == 'acl_users'">
  <!--Skipping <dtml-var id> -->
<dtml-else>
  <A HREF="<!--#var absolute_url-->"><!--#var title_or_id--></A>
</dtml-if>
<!--#/tree-->

-- 
John Goerzen   Linux, Unix consulting & programming   jgoerzen@complete.org |
Developer, Debian GNU/Linux (Free powerful OS upgrade)       www.debian.org |
----------------------------------------------------------------------------+
The 1,238,962nd digit of pi is 7.