[Zope] Calling Page Template with Dictionaries
Roy Rapoport
r.rapoport@fi.com
Tue, 22 Jul 2003 18:48:57 -0700
We know we can do this:
python script:
foo='bar'
return context['page_template'](arg=foo)
and in page_template:
Hello, arg is <p tal:content="string:${options/arg}"></p>
What I'm hoping to find out, though, is whether I could call a ZPT with a
dictionary.
My initial effort:
PS:
d = {}
d['arg'] = 'bar'
return context['page_template'](d)
page_template:
Hello, arg is <p tal:content="string:${options/arg}"></p>
Resulted in
Error Type: Undefined
Error Value: arg not found in 'options/arg', at line 12, column 11
Suggestions?
-roy
Content-Type: text/plain;
charset="iso-8859-1"
-------------------------------------------------
PLEASE READ THIS WARNING: All e-mail sent to or from this address will be
received or otherwise recorded by the Fisher Investments corporate e-mail
system and is subject to archival, monitoring or review by, and/or
disclosure to, someone other than the recipient.