14 Dec
2004
14 Dec
'04
7:35 p.m.
Martin Aspeli wrote:
Interesting... How can I do that (compile + execute as a template)?
If you're writing a filesystem Product, it should be a simple as: from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate [...] def run_template(self, *args, **kwargs): zpt = getattr(self, '_v_zpt', None) if zpt is None: t = self.generate_template_text() self._v_zpt = zpt = ZopePageTemplate('', t) zpt.__of__(self)(*args, **kwargs) This is totally untested, though. You may wish to look at FSPageTemplate.py from CMF's CMFCore package. Cheers, Evan @ 4-am