$template is a global helper to load and cache HTML templates on the fly.
$template
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"}) Copy
const html = $template.loadFiles( "views/layout.html", "views/content.html",).render({"name": "John"})
Note that this method is available only in pb_hooks context.
Generated using TypeDoc
$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:
Note that this method is available only in pb_hooks context.