Global-Only Settings

Global-only settings are settable only at the system global level, and apply to all admin-defined sites that exist. A setting changed at the global level cascades to all other sites in the site hierarchy. Place settings at the Global level that should not be available for override at the site level. For example, credentials for a third-party integration used by all sites should be global-only settings.

To add custom settings to the global site UI, create a modification class for CmsTool. The following example adds a site setting for a support person to assist editorial users. With this setting, Brightspot can retrieve the phone number of the specified user and display it in the page header.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
public class SupportSettings extends Modification<CmsTool> {

   @ToolUi.Tab("Support")
   @ToolUi.Cluster("Contact")
   private ToolUser user;

   public ToolUser getUser() {
      return user;
   }

   public void setUser(ToolUser user) {
      this.user = user;
   }
}

In the previous snippet—

  • Line 1 defines the class as a modification of CmsTool.
  • Lines 3–4 are field annotations for the site setting in line 5. These annotations specify how the site setting appears in the Edit Global Widget. As shown in the following screenshot, the setting appears in the Support tab under a “Contact” heading.

    There are several ToolUi annotations that control the presentation of fields in the editorial UI. For more information see Annotations.

  • Lines 7–13 are the getter and setter for the site setting.
../../../_images/edit-global-widget.png