[Zope] ZClasses meet PythonScripts, sample request

Max Møller Rasmussen maxm@normik.dk
Tue, 16 Jan 2001 09:28:13 +0100


From: Timothy Wilson [mailto:wilson@visi.com]

>> You have id as a form variable.  You will be disappointed by its
>> behavior.

>Care to elaborate on the problems with using id as a form variable.

You can be easily bitten by acquisition on this.

If you call a dtml-method that wants to use your "id" variable from the form
and you do: <dtml-var id> it will return the id of the zClass that the
method is in. If you use the form from a dtml-document you will get the id
of that. Under no circumstances will you get the variable from the form.

To get the id from the form you will have to use this idiom:

<dtml-var "REQUEST['id']">

or

<dtml-with REQUEST>
    <dtml-var id>
</dtml-with>

Regards Max M