Support and Documentation

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" 2

1

References a file with an absolute path.

2

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