-
-
Notifications
You must be signed in to change notification settings - Fork 184
Open
Description
Model:
public class Model
{
public string MacroName { get; set; }
}
var model = new Model {MacroName="foo"}
var context = new TemplateContext( model );
var template = paser.Parse(source)
template.Render(model)
Template:
{ % macro foo() %}
Foo
{% endmacro %}
{ % macro bar() %}
Bar
{% endmacro %}
{{ MacroName() }}
Is there any way to accomplish this? Short a giant If elsif else endif chain?
I am moving from StringTemplate and they had this capability.
Thanks so much
Jim
Metadata
Metadata
Assignees
Labels
No labels