Releases: zotonic/template_compiler
Releases · zotonic/template_compiler
2.0.0
1.6.0
1.5.1
1.5.0
This introduces an incompatibility where the variable m is now a reserved keyword.
Added support for models with an optional argument.
This is extensively used in Zotonic for accessing (database) models.
The syntax to access more rsc is:
{{ m.rsc.foo.bar::42 }}This will call the model_call function in the runtime as:
Runtime:model_call(rsc, [ <<"foo">>, <<"bar">> ], 42, Context).The argument is optional:
{{ m.rsc.foo.bar }}Calls the model as:
Runtime:model_call(rsc, [ <<"foo">>, <<"bar">> ], undefined, Context).