Global Configuration

Every Vertex site comes with a global configuration object which can be used to define global features such as logos, favicon, name (for title tag in head) and so on. The mechanics of updating the global configuration are identical to that of the page configuration. However, unlike the page configuration data, the global configuration is passed to every "render" call on the site hence making it available to every page.

Global Editor

The global editor for Vertex sites is accessed by clicking the "Configuration" menu link on the sidebar of your site's admin dashboard:



Here, you will see your site loaded into an editing console with a vertical menu bar on the left. Click the red button labeled "Global" to access the global editor:



Click on one of the sections that appears in the modal. Here you will see a series of inputs which correlate to text, images and links that appear on your site. To change a value, simply type the new value in the input field and click "Apply Changes"

Global Configuration

The global editing object for Vertex sites is supported by a JSON config file in the source code. It is stored in the "pages" folder and must be formatted as a valid JSON structure. The image below shows a sample global.json config file which supplies the global data for this site:



Sites are not required to have a global configuration object but it they do, the "render" function will match it to every template. This is done through a universal context data object passed to the 'req' argument via middleware:



This context object provides basic metadata about the site connected to the source code such as the site ID, API key, and of course, the global configuration object. If no site is connected to the project, the global config json file from the "pages" directory is returned in a dev environment. Below is a sample context object. The global configuration object is shown on line 10:

Updating Global Config

Updating the global config object is identical to update page configuration objects which is covered in detail HERE.

Summary

The global configuration editor is one of the most powerful features of Vertex sites. It enables developers to quickly update their projects without manually changing code and redeploying every time. It also provides a liaison for working with non-developers on the same project - such as freelance clients, friends and colleagues. Though not required by every site on Vertex 360, the page editor is a tremendous time saver and we encourage you to take advantage of its benfits.

Contact

If you have any questions, comments or feedback, feel free to contact us at matthew@turbo360.co