Project Configuration

This allows you to make configuration options which affect the whole site available in Backstage. The default Schema is empty.

1
You need to upload a Schema for the configuration in the Schemas section within the Developer App in Backstage:
Project Configuration in Developer App
2
Once you have uploaded a Schema, you can change the configuration within the Project Configuration App (see image below).

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.

Project Configuration App by Developer


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"
	    	},
	     	{
		     "label": "IP/IP-Range Whitelist",
		     "field": "frontasticBasicAuthIpWhitelist",
		     "type": "group",
		     "min": 0,
		     "fields": [{
		     "label": "IP/IP-Range",
		     "field": "ipRange",
		     "type": "string",
		     "translatable": false
	    	 }, 
	    	 {
		     "label": "Comment",
		     "field": "comment",
		     "type": "string",
		     "translatable": false
            	 }
	     ]
	 }
     ]
}

‹ Back to Article List


Still need help? Contact Us Contact Us