[Zope] Sending additional parameters to HTMLFile()

Dieter Maurer dieter@handshake.de
Thu, 3 Jan 2002 21:20:43 +0100


Max M writes:
 > ...
 >     formatTypes = ['format1', 'format2', 'format3']
 > 
 >     userTypes = ['type1', 'type2', 'type3']
 > ...
 > 
 > I have tried to add them like::
 > 
 > manage_addProductForm = HTMLFile('manage_addProductForm', globals(),
 >     {'formatTypes ':['format1', 'format2', 'format3'],
 >      'userTypes':['type1', 'type2', 'type3']})
 > 
 > But it doesn't work as I get an error saying that I am passing on to many
 > parameters.
You may try (not sure that it works!) to define the names in the
module namespace. Then "HTMLFile" might access them via "globals()".

I know that "PageTemplateFile" is stupid enough to use only a few
definitions from the passed in "globals()". But maybe, "HTMLFile"
is more intelligent.


Dieter