View Source Phoenix.Template.Engine behaviour (phoenix_view v1.1.2)

Specifies the API for adding custom template engines into Phoenix.

Engines must implement the compile/2 function, that receives the template file and the template name and outputs the template quoted expression:

def compile(template_path, template_name)

See Phoenix.Template.EExEngine for an example engine implementation.

Link to this section Summary

Link to this section Callbacks

Link to this callback

compile(template_path, template_name)

View Source

Specs

compile(template_path :: binary(), template_name :: binary()) :: Macro.t()