FunctionsCanopy
canopy.render
The canopy.render function renders a Canopy Block template directly, without any content from the Canopy editor.
{{ canopy.render(template, { ... }) }}| Argument | Description | Data Type |
|---|---|---|
template | The name of the block template | String |
settings (optional) | Setting values to merge over the template's defaults | Object |
Use this function when a section should always appear with fixed content, or to preview a block template while building it. The template renders with its default setting values, and anything you pass in the settings argument overrides those defaults.
Example
{{ canopy.render('hero') }}
{{ canopy.render('hero', { description: 'A custom description' }) }}Last updated on