Support and Documentation

Contextual rendering

Contextual rendering uses the {{render}} helper to specify a default template to be used 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"
        }
      ]
    }
  }
}

It should be noted that contextual rendering provides a mechanism to set the default template for a provided context. However, editors maintain the ability to override the contextually rendered template.