Skip to content

Releases: zotonic/template_compiler

1.6.0

21 Jan 15:19
877874a
Compare
Choose a tag to compare

Consistent handling of maps in for loops and lookups, see #26

1.5.1

18 Oct 15:49
Compare
Choose a tag to compare

Changes:

  • Export some extra types.
  • Correct model_call return format.

1.5.0

18 Oct 15:19
b6f2088
Compare
Choose a tag to compare

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).

1.4.0

07 Oct 09:08
46bf507
Compare
Choose a tag to compare

Changes:

  • Allow strings as keys for map values: %{ "foaf:name": "Joe Armstrong" }
  • Add tests for OTP 24, remove OTP 21
  • Remove generated .erl for parser from Hex package