Globals

Globals are groups of variables made available everywhere in your templates, all the time, and are never tied to any one specific page, entry, or URL.


Overview

Globals are designed for reusable content, such as:

  • Company info
  • Footer and sidebar content
  • Customer quotes or testimonials
  • Site settings (e.g. on/off switches for various features)
  • Success and/or error message text

You can create multiple Globals sets in site/content/globals, or Configure » Content » Globals in the control panel.

Variables set inside your default set (global.yaml) will simply be available in all your templates by their variable name. Each set/file becomes its own scope, allowing you to group your Globals together logically. For example, all of the variables inside a footer.yaml file will be accessed through {{ footer:var_name }}.

Managing Globals

Each Global set will need its own Fieldset to define what fieldtypes you want to use to edit the data.

Last modified on October 30, 2018