Module openflax.handler.template

Simple template generating handler for OpenFlax.

Behaviour: openflax.handler.

Description

Simple template generating handler for OpenFlax.

Typically this handler is swapped to from another handler. This handler doesn't care about the basic resource or document, and only uses the configuration settings given to it to generate a simple template.

Function Index

fill_out/2Replaces all ${tag}s in the given text with values from the dictionary.
serve/1Serves a template to the user agent.
start/1Initializes the templating handler.
stop/1Shuts down the templating handler.

Function Details

fill_out/2

fill_out(Text::string(), Conf::conf()) -> string()

Replaces all ${tag}s in the given text with values from the dictionary. The returned list is not flat.

serve/1

serve(Conf::conf()) -> {response(), conf()}

Serves a template to the user agent.

start/1

start(Conf::conf()) -> conf()

Initializes the templating handler.

stop/1

stop(Conf::conf()) -> conf()

Shuts down the templating handler.