Brightspot CMS Developer Guide

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.

Previous Topic
Helpers
Next Topic
Configuring a theme
Was this topic helpful?
Thanks for your feedback.
The elements that get you up and running in a matter of days, from pre-built content types, to modules, to landing pages.

Content types
Modules
Landing pages
Everything you need to manage and administer content within Brightspot CMS, including plug-and-play integrations.

Dashboards
Authoring content
Workflows
Admin configurations
A guide for installing, supporting and administering code on the Brightspot platform, including integrations requiring developer support to use.

Field types
Content modeling
Rich-text elements
Images