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
- virtual Str render(Obj? ctx, |Obj?? bodyFunc := null)- The main render method. The - bodyFuncis executed when- renderBody()is called. Use it for enclosing content in Layout templates. Example:- ... <%= ctx.layout.render(ctx.layoutCtx) { %> ... my body content ... <% } %> ...- ctxmust be provided. This prevents you from accidently passing in- bodyFuncas the- ctx. Example:- layout.render() { ... } - WRONG! layout.render(null) { ... } - CORRECT!- The signature for - bodyFuncis actually- |->|? bodyFunc- see source for an explanation of why- |Obj?|?is used.
- renderBody
- virtual Str renderBody()- Renders the body of the enclosing efan template. Example, a simple - layout.htmlmay be defined as:- <html> <head> <title><%= ctx.pageTitle %> </html> <body> <%= renderBody() %> </html>
- toStr
- virtual override Str toStr()- Returns efanMetaData.templateId()