[Zope] Howto on using zpt in products

Michael Bernstein webmaven@lvcm.com
Mon, 09 Jun 2003 17:43:50 -0700


Dylan Reinhardt wrote:
> On Mon, 2003-06-09 at 03:04, Sean K wrote:
> 
>>I am updating a product and as part of that update I
>>would like to use zpt for all of my presentation. 
> 
> The process is virtually the same.  Instead of:
> 
> ------
> 
> from Globals import DTMLFile
> [...]
>     DTMLFile(path, globals())
> 
> ------
> 
> use:
> 
> ------
> 
> from Products.PageTemplates.PageTemplateFile import PageTemplateFile
> [...]
>     PageTemplateFile(path, globals())

Please note that unlike DTMLFiles, PageTemplateFiles are restricted code 
(just as if they were in the ZODB).

Cheers,

- Michael Bernstein