The start configuration defines the starting point of the app. It specifies which display type, layout, client template, and named style are used when the app starts.
Quick guide
Start config files are stored in the ./start_config directory.
./start_config/
└── default.json
The default.json file contains a content object with the configuration settings.
{
"name": "default",
"content": {
"type": "layered",
"layout": "c_home",
"template": "home",
"templateIsNode": true,
"namedStyle": "main"
}
}
Start config files
By default, the app uses the default.json file. Additional start configurations can be created for different use cases, such as an onboarding.json configuration for an app introduction.
./start_config directory
Start config files are located in the ./start_config directory.
Start config file structure
Each start config file contains a name field and a content object.
The name field defines the name of the start configuration. It must match the filename.
./start_config/
├── default.json
└── onboarding.json
The content object contains the configuration. It can contain the following properties:
| Key | Type | Description | Default |
|---|
layout | String | Layout to be used. | null |
namedStyle | String | Named style to be used. | default |
query | String | Query to be used. | null |
table | String | Database table to be used. | null |
template | String | Client template to be used. | null |
templateIsNode | Boolean | Defines whether the template is a node. | null |
type | String | Type of the displayed view. Possible values are layered and tab. | null |
Examples
Basic start config
This example shows a basic default.json start configuration.
{
"name": "default",
"content": {
"type": "layered",
"layout": "c_home",
"template": "home",
"templateIsNode": true,
"namedStyle": "main"
}
}
Switching between start configurations
If several start configurations are available, they can be switched using the setCustomStart action.
{
"type": "setCustomStart",
"params": {
"startConfig": "onboarding",
"switchToCustomStart": true
}
}
In this example, the onboarding start configuration is selected.
Troubleshooting
If a start configuration does not work as expected, check the following:
- Is the start configuration stored in the
./start_config directory?
- Does the
name field match the filename?
- Do the referenced layout, client template, and named style exist?
- Is the start configuration name in
setCustomStart spelled correctly?