0

The docs say:

"Starting with release 0.9.1, the recommended way to add custom tags and filters are to register a module"

How does one register a module with erlydtl?

Andriy Drozdyuk
  • 58,435
  • 50
  • 171
  • 272
  • If you don't get an answer here the team that maintains the project is very responsive on their dedicated group mailing list: http://groups.google.com/group/zotonic-developers – Greg Apr 01 '16 at 15:24
  • @Amiramix What is "zotonic"? – Andriy Drozdyuk Apr 01 '16 at 15:50
  • 1
    Oh well, it's an Erlang CMS that extensively uses `erlydtl` when generating web pages http://zotonic.com/docs/0.13/developer-guide/templates.html It could be a custom version but many developers contribute to both projects, so very likely they will be aware of the changes happening in the other version. – Greg Apr 01 '16 at 17:30

1 Answers1

1

From my answer at https://github.com/erlydtl/erlydtl/issues/238

It's the options that refers to library you want (from the Readme):

libraries - A list of {Name, Module} libraries implementing custom tags and filters. Module should implement the erlydtl_library behaviour.

And:

default_libraries - A list of libraries that should be loaded by default when compiling a template. Libraries can be specified either by name (when there is a name to module mapping also provided in the libraries option) or by module.

If you register a library, but doesn't load it by default, you can load it from a template with the {% load libname %} tag.

Kaos
  • 984
  • 7
  • 17