[Zope] How to call PageTemplate from python script?

Evan Simpson evan@4-am.com
Mon, 30 Jul 2001 09:38:45 -0400


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