Skip to content

Releases: zotonic/template_compiler

2.0.0

28 Jan 08:38
0cd9bf7

Choose a tag to compare

Main changes:

  • Minimum OTP version is now 22
  • Logger is now used for logging, removal of lager.
    This is an incompatible change as no messages will be logged in projects having lager.

1.6.0

21 Jan 15:19
877874a

Choose a tag to compare

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

1.5.1

18 Oct 15:49

Choose a tag to compare

Changes:

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

1.5.0

18 Oct 15:19
b6f2088

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

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