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.
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