from Products.Five import BrowserView from zope.app.pagetemplate import ViewPageTemplateFile class CaldozView(BrowserView): """ Caldoz main view """ def test(self, opt, tru, fal=None): if opt: return tru return fal class CaldozMacro(BrowserView): """ Caldoz page macro """ template = ViewPageTemplateFile('templates/page_macro.pt') def __getitem__(self, key): return self.template.macros[key] class CaldozGeneralMacro(BrowserView): """ Caldoz page macro """ template = ViewPageTemplateFile('templates/macros.pt') def __getitem__(self, key): return self.template.macros[key]