Brightspot CMS Developer Guide

Templates


A template is an HTML file with placeholders for variables. Brightspot’s templates are based on Handlebars.

The following snippet is an example of a simple template.

<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>{{headline}}</title> 
    </head>

    <body>
        <div> 
            <div>
                <h1>{{headline}}</h1> 
            </div>
            <div>
                {{body}} 
            </div>
            <div>
                <img src="{{imageUrl}}" height="300"> 
            </div>
        <div>
    </body>

</html>
  • Declares a title tag, the value of which is a variable headline. (Literals in {{double braces}} are placeholders for dynamic content.)
  • Opens an empty <div> tag.
  • Declares an h1 tag, the value of which is a variable headline.
  • Declares a placeholder for the article’s variable body.
  • Declares an image tag, the source of which is a variable URL.

Previous Topic
Generating Java view interfaces from data files
Next Topic
Handlebars Helpers
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.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
Images
A guide for configuring different integrations to support a multitude of use cases.

Google Analytics
Shopify
Apple News