<div dir="ltr">Rowan,<br>&nbsp;&nbsp; Can you try inheriting from dtml-document instead of simple-item? I use dtml document as much as I can. It is a big object but you almost always need to call a dtml object anyway. And all the methods are already battle tested. (BTW, for me zope is almost entirely the model, and the view and most of the controller are in the browser so I am not as concerned about mixing content with logic inside zope. ymmv)<br>
<br>dtml-tree is cool but it can be flakey<br><br>-Tim<br><br><br><div class="gmail_quote">On Wed, Jul 30, 2008 at 12:13 PM, Rowan Woodhouse <span dir="ltr">&lt;<a href="mailto:rwoodhouse@wirelessmeasurement.com">rwoodhouse@wirelessmeasurement.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
I&#39;m developing a Zope product that uses a dtml file to generate the html page. I&#39;d like to include a dtml-tree based tree for navigation on the page. The custom object inherits from SimpleItem. When I include the follow code in the dtml file:<br>

<br>
&lt;dtml-tree&gt;<br>
 &nbsp;&lt;dtml-var id&gt;<br>
&lt;/dtml-tree&gt;<br>
<br>
I get the following exception:<br>
<br>
An error was encountered while publishing this resource.<br>
<br>
exceptions.KeyError<br>
Sorry, a site error occurred.<br>
<br>
Traceback (innermost last):<br>
<br>
 &nbsp; &nbsp;* Module ZPublisher.Publish, line 202, in publish_module_standard<br>
 &nbsp; &nbsp;* Module ZPublisher.Publish, line 150, in publish<br>
 &nbsp; &nbsp;* Module ZPublisher.Publish, line 119, in publish<br>
 &nbsp; &nbsp;* Module ZPublisher.mapply, line 88, in mapply<br>
 &nbsp; &nbsp;* Module ZPublisher.Publish, line 42, in call_object<br>
 &nbsp; &nbsp;* Module Products.WellGroup.WellGroup, line 110, in index_html<br>
 &nbsp; &nbsp;* Module App.special_dtml, line 65, in __call__<br>
 &nbsp; &nbsp;* Module DocumentTemplate.DT_String, line 476, in __call__<br>
 &nbsp; &nbsp;* Module TreeDisplay.TreeTag, line 88, in render<br>
 &nbsp; &nbsp;* Module TreeDisplay.TreeTag, line 192, in tpRender<br>
<br>
KeyError: &#39;URL&#39;<br>
<br>
If I add a class variable called URL I then get a key error for RESPONSE.<br>
<br>
My understanding from documentation is that Item (from which SimpleItem inherits) gives the product basic dtml-tree support. I can&#39;t find any examples that spell out how to write a product that supports dtml-tree tags. Could someone point me in the right direction?<br>

<br>
Thanks,<br>
Rowan<br>
<br>
_______________________________________________<br>
Zope maillist &nbsp;- &nbsp;<a href="mailto:Zope@zope.org" target="_blank">Zope@zope.org</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope" target="_blank">http://mail.zope.org/mailman/listinfo/zope</a><br>
** &nbsp; No cross posts or HTML encoding! &nbsp;**<br>
(Related lists - <a href="http://mail.zope.org/mailman/listinfo/zope-announce" target="_blank">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>
<a href="http://mail.zope.org/mailman/listinfo/zope-dev" target="_blank">http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br>
</blockquote></div><br></div>