Prev Next

<html>
<head>
<title nevow:data="group_name" nevow:render="upper_string">HELLO </title>
</head>
<body>
<p>Welcome to the wonderful world of Nevow,
<span nevow:data="group_name" nevow:render="string" />!</p>
</body>
</html>

class Page(rend.Page):
docFactory = loaders.htmlfile('hellohtml.html')
def data_group_name (self, context, data):
return "Chipy"
def render_upper_string (self, context, data):
return context.tag[data.upper()]
yields

<html><head><title>HELLO CHIPY</title></head>
<body><p>Welcome to the wonderful world of Nevow, <span>Chipy</span>!</p>
</body></html>