Run template handling from template directory.
Uses simple-template: https://github.com/rla/simple-template
- reply_html(HTML:str) is det
- Reply with raw string as html
- Arguments:
-
HTML | - a string assumed to be HTML
! reply_html(:Head, :Body) is det
wrapper to reply_html_page/2
replies with termerized html
! reply_html(+Style, :Head, :Body) is det
wrapper to reply_html_page/3
replies with termerized html |
- reply_template(+Template:atom, +Data:dict) is det
- Reply with simple-template
- Arguments:
-
Template | - The name of the template, ".html" not required |
Data | - Dict of keys and values used in the template |
- reply_template(+Template:atom, +Data:dict, +Options:dict) is det
- Reply with simple-template, providing simple-template options:
- encoding - default config utf8.
- extension - file name extension, default config html.
- cache - whether to use cache, default config false.
- strip - whether to try to strip whitespace from output, default config false.
- frontend - which syntax to use, currently simple (default config) or semblance.
- undefined - throw error on undefined variables - error (default config) or false (evaluates to false).
@arg Template The name of the template, ".html" not required
@arg Data Dict of keys and values used in the template
@arg Options Dict of options as described for simple-template
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- reply_html(Arg1, Arg2)
- reply_html(Arg1, Arg2, Arg3)