i do it in another way:
i have a BasePage class - which is a skeleton for other Pages:
class BasePage(rend.Page):
__implements__ = rend.Page.__implements__
TITLE = "Common Page"
docFactory = loaders.xmlfile("_tpl/common/page.xml")
def render_title(self, ctx, data):
ctx.fillSlots("title", self.TITLE)
return ctx.tag
def render_content(self, ctx, data):
raise NotImplementedError, "You MUST overload render_content() method!!!"
And BasePage tremplate:
<html>
...metas
<body>
...layout
<n:invisible n:render="content" />
</body>
</html>
And then all of the site pages are using this prototype:
class Root(common.BasePage):
def render_content(self, ctx, data):
return loaders.xmlfile("_tpl/root.xml")
i can return ANY xml-temlate i'd like :)
for example a form or a "form submitted successful" message