Skip to main content

Contextual rendering

Contextual rendering uses the {{render}} helper to specify a default template for a given context.

{{render this [/core/promo/Promo.hbs]="/core/promo/FancyPromo.hbs"}}

In the above scenario FancyPromo.hbs must be registered as a style variation (see Style variations) in a _config file:

{
"styles": {
"/core/promo/Promo.hbs": {
"templates": [
{
"displayName": "Fancy Promo",
"example": "/core/promo/FancyPromo.json"
}
]
}
}
}

Editors can override the default template for a given context.