render($fileName, $data)
Render a template with the given data, using handlebars.
Usage
site()->render($fileName, $data);
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
$fileName | string | Yes | The name of the template, folder and file extension not included. |
$data | array | Yes | An associative array of data to pass to the template. |
Returns
Type | Description |
---|---|
string | Compiled HTML code |
Example
Rendering a template with handlebars (Getting Started)