Project Configuration

The project configuration allows you to make configuration options which affect the whole site available in backstage. You need to upload a schema for the configuration in the "Schemas" developer tool. The default schema is empty. After uploading a schema which contains some field, you can change the configuration from the "Project Configuration" app. You can access the configured values from PHP and from JavaScript code in the context. The project configuration can be changed for each environment separately.

The catwalk supports some configuration options out of the box. Currently the project configuration can be used to add a global pre- and suffix to the page title and to add HTTP basic auth to the complete site. Use the following project configuration schema to enable those settings:

{
    "schema": [
        {
            "name": "Page",
            "fields": [
                {
                    "label": "Title Prefix",
                    "field": "frontasticPageTitlePrefix",
                    "type": "string",
                    "translatable": true,
                    "default": ""
                },
                {
                    "label": "Title Suffix",
                    "field": "frontasticPageTitleSuffix",
                    "type": "string",
                    "translatable": true,
                    "default": " | Built on Frontastic"
                }
            ]
        },
        {
            "name": "Basic Authentication",
            "fields": [
                {
                    "label": "Username",
                    "field": "frontasticBasicAuthUsername",
                    "type": "string",
                    "translatable": false,
                    "default": "frontastic"
                },
                {
                    "label": "Password (leave empty to disable basic auth)",
                    "field": "frontasticBasicAuthPassword",
                    "type": "string",
                    "translatable": false,
                    "default": ""
                },
                {
                    "label": "Realm",
                    "field": "frontasticBasicAuthRealm",
                    "type": "string",
                    "translatable": false,
                    "default": "Access denied"
                }
            ]
        }
    ]
}