xPulse
πŸ‡¬πŸ‡§ EN
Pages
Contents

API

render(view, data)

const html = await template.render('info/bla', { title: 'Bla' });

view is flexible:

If view cannot be resolved to a file, the string is rendered as an inline template.

renderHtml(html, data)

const html = await template.renderHtml('<h1>{{ title }}</h1>', { title: 'Hi' });

Events

Event Payload When
template:init { root, paths } Discovery begins
template:discovered { name, file, path } Individual template found
template:ready { count, templates } All templates discovered
template:render:before { view, data, traceId, dataKeys } Rendering begins
template:render:after { view, html, duration, traceId, dataKeys } Rendering complete
template:loaded { name, path } Template file loaded
template:methods:discovered { count, sources } Method discovery complete
template:method:registered { name, source } Individual method registered
en/api.md 2026-04-10