const classafSlim::Slim

sys::Obj
  afSlim::Slim

(Service) - Non-caching service methods for parsing and compiling Slim templates efan templates, and for rendering HTML.

For further information on the ctx parameter, see efan: Passing Data

Note: This class is available as a service in IoC v3 under the root scope with an ID of afSlim::Slim.

compileFromFile

Source

EfanMeta compileFromFile(File slimFile, Type? ctxType := null, Type[]? viewHelpers := null)

Compiles a renderer from the given slim file.

compileFromStr

Source

EfanMeta 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

Source

new make(TagStyle tagStyle := TagStyle.html)

Creates a Slim instance, setting the ending style for tags.

Defaults to TagStyle.html.

parseFromFile

Source

Str parseFromFile(File slimFile)

Parses the given slim file into an efan template.

parseFromStr

Source

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

Source

Str renderFromFile(File slimFile, Obj? ctx := null, Type[]? viewHelpers := null)

Renders the given slim template file into HTML.

renderFromStr

Source

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

Source

const TagStyle tagStyle

The void tag ending style for compiled templates