Settings in 2sxc
Settings allow your code to use predefined settings across all apps and sites. And they allow you to overide a setting at any level of the application. You can read more about the settings in the docs 📕.
The samples can differ based on your Razor base class or if you're running an old version.
Switch to Typed (2sxc 16+) Switch to Dynamic (Razor14 or below)
Switch to Typed (2sxc 16+) Switch to Dynamic (Razor14 or below)
The following settings were configured on this View - see docs
⬇️ Result | Source ➡️
-
Settings.PrimaryColor
#8BC34AD9 -
Settings.SecondaryColor
#00BCD4B3 -
Settings.Tiles
(for example to configure images side-by-side): 0
The following settings were configured on this App - see docs
⬇️ Result | Source ➡️
-
App.Settings.PrimaryColor
#8BC34AD9 -
App.Settings.SecondaryColor
#00BCD4B3 -
App.Settings.QrForegroundColor
#000000 -
App.Settings.QrBackgroundColor
#FFFFFF -
App.Settings.QrDimension
200
Settings Stack
Global and local settings are merged together, so you can access them no matter where they were defined.
This demo app will be installed on many sites which don't have any settings, so there is no code to demo this.
⬇️ Result | Source ➡️
-
AllSettings.Images.Content.Width
1400 -
AllSettings.Images.Content.AspectRatio
1.618