[Zope] Tree Tag question: from zope 1.x to zope 2.x

Gilles Lavaux gilles.lavaux@esrin.esa.it
Mon, 3 Jul 2000 15:00:14 +0200


Hello,

I want to display the content of a site starting from a folder called 'Site'
with a tree tag.
I want also to render immediately inside the tree the documents with an
ID=='PUBLIC_Doc'.
In Zope 1.x I have a working dtml method like this:

<!--#var standard_html_header-->
<!--#tree Site branches_expr="objectValues()" sort=id skip_unauthorized-->
  <b><!--#var id--></b>
  <!--#if "_['id']=='PUBLIC_Doc'"-->
    ##
    <!--#try-->
      <!--#var "_[_['id']]"-->
    <!--#except-->
      <!--#var Except_Message-->
    <!--#/try-->
    ##
  <!--#/if-->
<!--#/tree-->
<!--#var standard_html_footer-->

Unfortunatly for me , with zope 2.1.6 i get an error when I try to render
the 'PUBLIC_Doc' document:
.....
PUBLIC_Doc !#
Error type:AttributeError
Error Message:
Error Message:__call__
Error TB:Traceback (innermost last): File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Try.py", line 221, in
render_try_except result = render_blocks(self.section, md) File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 335, in
eval return eval(code,globals,d) File "", line 0, in ? File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py", line 161, in
careful_getitem v=mapping[key] File
"/usr/share/zope/lib/python/OFS/DTMLMethod.py", line 146, in __call__
r=apply(HTML.__call__, (self, client, REQUEST), kw) File
"/usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py", line 502,
in __call__ try: return render_blocks(self._v_blocks, md) AttributeError:
__call__

has someone a solution ??

Thanks,

Gilles