const mixinafEfan::EfanRenderer
afEfan::EfanRenderer
Represents a compiled efan template. Returned from EfanCompiler.
- efanMetaData
abstract EfanMetaData efanMetaData
Meta data about the compiled efan templates
- render
The main render method.
Renders the efan template to a Str, passing in the given
ctx
(which must fit ctxType).- renderBody
virtual Void renderBody()
Renders the body of the enclosing efan template. Example, a
layout.html
may be defined as:<html> <head> <title><%= ctx.pageTitle %> </html> <body> <div class="wotever"> <% renderBody() %> </div> </html>
- renderEfan
virtual Void renderEfan(EfanRenderer renderer, Obj? rendererCtx := null, |EfanRenderer? bodyFunc := null)
Renders the given nested efan template. Use when you want to enclose content in an outer efan template. The content will be rendered whenever the renderer calls
renderBody()
. Example:... <% renderEfan(ctx.layout, ctx.layoutCtx) { %> ... my main content ... <% } %> ...