$template is a global helper to load and cache HTML templates on the fly.

The templates uses the standard Go html/template and text/template package syntax.

Example:

const html = $template.loadFiles(
"views/layout.html",
"views/content.html",
).render({"name": "John"})

Note that this method is available only in pb_hooks context.

Index

Functions

Generated using TypeDoc