·¬ÇÑÉçÇø

Brightspot CMS Developer Guide

Site settings


A custom site setting added at the global level is inherited by admin-defined sites, but the setting can be changed only in the global site. When you add a custom setting, you have the option of making the setting available on admin-defined sites as well as the global site. This gives an administrator the ability to override the global setting with a site-specific setting. For example, different sites could have different support contacts; therefore, it makes sense to give site administrators the ability to override the global support setting.

To make site setting fields appear in the UI for all sites (not just Global), specify the target of the modification to .

public class SupportSettings extends Modification<SiteSettings>


To retrieve a site setting, call the SiteSettings#get method, which returns the setting for a specified site, with a fallback to the Global site if the specified site is null. For example, continuing with the SupportSettings code example, the following statement passes the site to SiteSettings#get, as well as the SupportSettings#getUser method. The method is passed as a Function object.

return SiteSettings.get(site, item -> item.as(SupportSettings.class).getUser());

If site is not equal to null, then the setting from the admin-defined site is retrieved; otherwise, the method falls back to the Global setting for user.

Previous Topic
Global-only settings
Next Topic
Multi-site considerations
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

•
•
•
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

• Content types
• Modules
• Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

• Dashboards
• Publishing
• Workflows
• Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

• Field types
• Content modeling
• Rich-text elements
• Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

• Google Analytics
• Shopify
• Apple News