const classafSlim::Slim
sys::Obj afSlim::Slim
Non-caching service methods for parsing, compiling and rendering slim templates into HTML.
For further information on the ctx
parameter, see efan: Passing Data
- compileFromFile
EfanRenderer compileFromFile(File slimFile, Type? ctxType := null, Type[]? viewHelpers := null)
Compiles a renderer from the given slim file.
- compileFromStr
EfanRenderer compileFromStr(Str slimTemplate, Type? ctxType := null, Type[]? viewHelpers := null, Uri? srcLocation := null)
Compiles a renderer from the given slim template.
srcLocation
may anything - used for meta information only.- make
new make(TagStyle tagStyle := TagStyle.html)
Creates a
Slim
instance, setting the ending style for tags.Defaults to
html
.- parseFromFile
Str parseFromFile(File slimFile)
Parses the given slim file into an efan template.
- parseFromStr
Str parseFromStr(Str slimTemplate, Uri? srcLocation := null)
Parses the given slim template into an efan template.
srcLocation
may anything - used for meta information only.- renderFromFile
Str renderFromFile(File slimFile, Obj? ctx := null, Type[]? viewHelpers := null)
Renders the given slim template file into HTML.
- renderFromStr
Str renderFromStr(Str slimTemplate, Obj? ctx := null, Type[]? viewHelpers := null, Uri? srcLocation := null)
Renders the given slim template into HTML.
srcLocation
may anything - used for meta information only.- tagStyle
const TagStyle tagStyle
The void tag ending style for compiled templates