const mixinafGenesis::EfanTemplates

afGenesis::EfanTemplates

Renders Embedded Fantom (efan) templates against a given context.

renderFromFile

abstract Str renderFromFile(File efanFile, Obj? ctx := null)

Renders an .efan template file with the given ctx. The compiled .efan template is cached for re-use.

renderFromStr

abstract Str renderFromStr(Str efan, Obj? ctx := null)

Renders the given template with the ctx.

Warning: Overuse of this method could cause a memory leak! A new Fantom Type is created on every call.

rendererForFile

abstract EfanRenderer rendererForFile(File efanFile, Type? ctxType := null)

Returns (or compiles) a renderer for the given file.