render($fileName, $data)

Render a template with the given data, using handlebars.

Usage

site()->render($fileName, $data);

Parameters

ParameterTypeRequiredDescription
$fileNamestringYesThe name of the template, folder and file extension not included.
$dataarrayYesAn associative array of data to pass to the template.

Returns

TypeDescription
stringCompiled HTML code

Example

Rendering a template with handlebars (Getting Started)