<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
To expand on Maik's earlier post, what I do to accomplish what you are
trying is to add items to the request object then call the dtml
method.&nbsp; It works great.<br>
<br>
For example:<br>
<br>
container.REQUEST.set('item1', value1)<br>
return context['dm2'](container, container.REQUEST)
<br>
<br>
Kevin<br>
<br>
Marc de Kamps wrote:<br>
<blockquote type="cite"
 cite="midFKELIJIFEPGFPAFIMKNAMEDICAAA.kamps@in.tum.de">
  <pre wrap="">Greetings,

I have a folder, containing dtml method1  (dm1), python script (ps) and dtml
method 2 (dm2).

- dtml method1 contains a form, which calls ps. arguments of ps are the
information collected
  in the text inputs of dm1. Works fine.

- ps processes the argument and depending on the values, does nothing or
calls
  dm2, with the statement: return context.dm2(name_value=name)

- Hence if I use &lt;dtml-var name_value&gt; in dm2, I expect it to have the
value: name, and it does.

I tried to use other dtml variables, which are defined in the same folder,
however in dm2, and
they were all undefined. This puzzled me.

After reading the Zope book, my interpretation of events is that a dtml
method typically is
called inside other dtml methods and then operates on the folder, from which
it is called.
That is not the case here. It now operates on something else: the Python
script, or the return
value of the Python script.

My first question is: Is this correct, is this why dm2 fails to recognize
other dtml variables,
defined in the same folder ?

My second question is: what to do about this ?

thanks,
        Marc



Marc de Kamps - Neuro-IT.net
e-mail: <a class="moz-txt-link-abbreviated" href="mailto:kamps@in.tum.de">kamps@in.tum.de</a>
tel:    0049-89-28918128



_______________________________________________
Zope maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
**   No cross posts or HTML encoding!  **
(Related lists - 
 <a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
 <a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )

  </pre>
</blockquote>
</body>
</html>