Home | Trees | Indices | Help |
|
---|
|
object --+ | base.structure.StructureBase --+ | object --+ | | | base.common.Parser --+ | base.structure.ParseableStructure --+ | base.structure.Structure --+ | object --+ | | | base.structure.RestrictionMixin --+ | CustomPageFunction --+ | CustomRF
A custom render function for a service.
Custom render functions can be used to expose certain aspects of a service to Nevow templates. Thus, their definition usually only makes sense with custom templates, though you could, in principle, override built-in render functions.
In the render functions, you have the names ctx for nevow's context and data for whatever data the template passes to the renderer.
You can return anything that can be in a stan DOM. Usually, this will be a string. To return HTML, use the stan DOM available under the T namespace.
As an example, the following code returns the current data as a link:
return ctx.tag[T.a(href=data)[data]]
You can access the embedding service as service, the embedding RD as service.rd.
Nested Classes | |
Inherited from |
Instance Methods | |
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
Class Methods | |
Inherited from |
Class Variables | |
name_ =
a sentinel for all kinds of undefined values. |
|
Inherited from Inherited from Inherited from |
Properties | |
Inherited from |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |