How to call PageTemplate from python script?
Hi, How to call PageTemplate from python script? And how to pass arguments? How to access these arguments in PageTemplate? Please show me an example. Cheers Dirksen P.S. I've tried this, doesn't work. test.py: return test_zpt(context, context.REQUEST, header='abc') text_zpt: <p tal:content="here/header">dummy</p> __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Dirksen wrote:
How to call PageTemplate from python script? And how to pass arguments? How to access these arguments in PageTemplate? Please show me an example.
Page Templates can be called normally, with no magic arguments. If you pass keyword arguments, you can access them using the 'options' variable:
return test_zpt(header='abc')
text_zpt: <p tal:content="options/header">dummy</p>
Cheers, Evan @ 4-am & Zope
participants (2)
-
Dirksen -
Evan Simpson