Brightspot CMS Developer Guide

Pathing for referred data files and templates


Within a data file, you can refer to other data files and templates using absolute or relative paths. An absolute path is indicated by /, starting from the styleguide/ directory. A relative path is indicated by ./ or ../, starting from the directory in which the data file resides. (Do not include the styleguide/ directory in an absolute path.)

In the following illustration, the data files reference a template in a different directory.

./
└── styleguide/
    ├── article/
    │   ├── Article.hbs
    │   └── Article.json
    ├── blogpost/
    │   └── BlogPost.json (“_template”: ”/article/Article.hbs” 1
    └── image/
        └── Image.json (“_template”: ”../article/Article.hbs”
  • References a file with an absolute path.
  • References a file with a relative path.

Pathing behavior applies to both the root styleguide/ directory that contains the default theme (brightspot/express/styleguide/), as well as the child styleguide/ directories nested within the various themes’ directories, such as brightspot/express/themes/brightspot-theme-falcon/.

See also:

Previous Topic
Data files
Next Topic
Populating the Styleguide preview
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Modules
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

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

Field types
Content modeling
Rich-text elements
Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Shopify
Apple News