15 Apr
2004
15 Apr
'04
3:16 p.m.
Hi Wyatt,
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
def manage_addMyContainerForm(self, REQUEST): pt = None if self.meta_type in ['ContainerType1', 'ContainerType2']: pt = PageTemplateFile('zpt/addMyContainerForm', globals()) else: pt = PageTemplateFile('zpt/containerError', globals()) return pt.pt_render()
I guess the problem is that the page template file is called without acquision context. Usually a page template file is a class attribute of a class which knows about acquisition. You could mange in the right context via return pt.__of__(self).pt_render() but I am not sure if this will fly. Cheers, Clemens