Mustache context for setting values
Cache level for compile result
Clears the intenal cache. Useful for forcing reloads when using CacheLevel.once.
Renders name template with context.
OutputRange version of render.
string version of render.
string/OutputRange version of render.
Property for template extenstion
Property for callback to dynamically search path. The result of the delegate should return the full path for the given name.
Property for callback handler
Property for cache level
Property for template searche path
Options for rendering
alias MustacheEngine!(string) Mustache; Mustache mustache; auto context = new Mustache.Context; context["name"] = "Chris"; context["value"] = 10000; context["taxed_value"] = 10000 - (10000 * 0.4); context.useSection("in_ca"); write(mustache.render("sample", context));
sample.mustache:
Hello {{name}} You have just won ${{value}}! {{#in_ca}} Well, ${{taxed_value}}, after taxes. {{/in_ca}}
Output:
Hello Chris You have just won $10000! Well, $6000, after taxes.
Core implementation of Mustache
String parameter means a string type to render.