Re: [Zope] Strange Tree Error
I still have no idea about this one. I just thought I'd add that I am using Zope 2 and that my other trees behave fine, and that this one behaves fine except for Expand All. Ideas welcome! :-) John Goerzen <jgoerzen@complete.org> writes:
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.
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For developer-specific issues, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
-- John Goerzen Linux, Unix consulting & programming jgoerzen@complete.org | Developer, Debian GNU/Linux (Free powerful OS upgrade) www.debian.org | ----------------------------------------------------------------------------+ The 132,984,390th prime number is 2,750,300,323.
At 20:55 08/09/99 , John Goerzen wrote:
I still have no idea about this one. I just thought I'd add that I am using Zope 2 and that my other trees behave fine, and that this one behaves fine except for Expand All. Ideas welcome! :-)
John Goerzen <jgoerzen@complete.org> writes:
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-->
Hmmm. I bet those other trees use the 'branches' attribute. This is a bug. File it at http://www.zope.org/Collector/ I'd fix it if I could get my head round this piece of code.. it looks like a serious rewrite is needed to fix this one.. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
participants (2)
-
John Goerzen -
Martijn Pieters