[Zope] dtml-tree question

Jonothan Farr jfarr@real.com
Thu, 27 Jul 2000 22:14:29 -0700


What is the difference between using the dtml-tree tag in a dtml method and
using it in a dtml document? I have code that works perfectly in a dtml method
but when I try the exact same code in a dtml document it doesn't display
anything.

Is it because the document is at the top of the namespace stack instead of the
request object in the dtml document case, but not in the dtml method case? My
branches method is a zsqlmethod that acquires its parameter from the namespace.

Here's the code, if that helps:

<dtml-var standard_html_header>
<dtml-tree branches=select_subprojects id=project_id>
  <small><a
href="edit_project?project_id=&dtml-project_id;">edit</a></small>&nbsp;
  <a href="view_project?project_id=&dtml-project_id;"><dtml-var
project_name></a>&nbsp;</td>
  <td align=right valign=top><dtml-var task_count>
</dtml-tree>
<dtml-var standard_html_footer>

select_subprojects is a zsqlmethod, the fields are project_id, project_name, and
task_count. It takes one parameter, project_id which it acquires from the result
set of the previous call to itself.

I'm stumped. I could just use a dtml method instead of a document but I want to
understand this.

Thanks,
--jfarr