[ZPT] Passing "options" keyword arguments to a PageTemplateFile?
Fri, 14 Feb 2003 14:55:17 -0500
I'm creating a file-system-based product for Zope. In my main product
class module, I have defined a list of "categories". I'm trying to pass
the list as a keyword argument to a Page Template so I may access the
attribute within the ZPT via the "options" built-in keyword.
The text of the Page Template also resides on the file system in a
subdirectory ('zpt') of my product's directory. In my class module, I
create myForm like so:
myForm = PageTemplateFile('zpt/myForm', globals())
I cannot understand how to somehow call the myForm ZPT with the keyword
argument, e.g. theForm = myForm(list=categories). Ultimately, I just
want the form ZPT to render a list of "categories" defined in the class
Has anyone succeeded in anything like this? This has been driving me
nuts for a week or so. Please, ANY advice would be greatly appreciated.
Thanks in advance,
Detroit Michigan USA