class Page(PageBase): implements(interfaces.IPage) title = None subtitle = None has_header = True page_class = 'page' container_class = 'container' template = templates.File('templates/main.pt') page_template = templates.File('templates/page.pt') content_template = None render = PageBase.render disabled = False def __call__(self, *args, **kw): disabled = self.disabled if (disabled and (not isinstance(disabled, (str, unicode)) or disabled.strip().lower() not in ('no', 'false'))): raise NotFound(self, self.__name__, self.request) self.update() if self.request.response.getStatus() in [ 300, 301, 302, 303, 304, 305, 307 ]: return u'' result = self.render(*args, **kw) return result
class Content(Viewlet): template = templates.File('templates/page_content.pt') body_template = None render = lambda self, *a, **kw: self.template(*a, **kw)
class ModalFormLinkViewlet(LinkIdViewlet): template = templates.File('templates/modal_form_link.pt') @property def form_container_id(self): return '%s-container' % self.html_id
class NoSidebarPage(Page): container_class = 'container extra-wide-container' page_template = templates.File('templates/page_nosidebar.pt')