Table of Contents

Configuration, Settings and Resources in 2sxc ✨ new

you are here (click to zoom) - discover the stack

Settings can be a complex issue as the should have an effect on different scopes. Here are some examples:

  1. An input-field may have a setting to show/hide a button
  2. An App may have a setting which affects the entire App
  3. A system may have a setting which affects the entire installation

In an ideal world, these settings can compound each other to determine defaults, fallbacks and overrides. 2sxc has some of this ready, other parts are still in development.

Tip

In 2sxc/EAV we talk about Configuration when something has a standard set of properties and about Settings when the properties can vary dynamically.

So an App-Configuration contains standardized aspects like the Folder it's in, while App-Settings can be a dynamic set of properties that are different in each App.

Resources on the other hand are simply meant for language/culture specific labels, logos and similar. They are also dynamic, so they can have as many values as you need.

Settings and Resources are Stacked

Settings and Resources can be configured at any level of the application. This is how it stacks up:

👉 Learn more about the Settings Stack in 2sxc ✨ new! and the Resources Stack in 2sxc ✨ new!

👉 Learn about the predefined System-Settings

👉 Learn about the predefined System-Resources

Global Level

Global Configuration

As of now (v12) global Configuration only exists for Features which can be enabled/disabled at the system level. This is primarily for security reasons.

In addition some minor global Configuration exists for alternate Caching systems (like using Redis) but this is only for 2sxc Professional.

Global Settings and Resources

Global Settings and Resources were introduced in 2sxc 12.04. Read about configuring them in the Settings Stack in 2sxc ✨ new!.

In C#/Razor you can access the Settings Stack using the Settings object and the Resources Stack using the Resources object.

Note: there are some global ADAM Settings that can be configured in a different way, but it's not standardized/finalized yet, so not public, and we'll try to move that into the new standard.


Site Level (Portal)

Site Configuration

Only Languages are configured at Site-Level.

Site Settings and Resources

Site-Wide Settings and Resources were introduced in 2sxc 12.04. Read about configuring them in the Settings Stack in 2sxc ✨ new!.

In C#/Razor you can access the Settings Stack using the Settings object and the Resources Stack using the Resources object.


App Level

App Configuration

Apps have a standard App-Configuration containing their version, name, folder etc.

In Razor you can access this on the dynamic App.Configuration object.

App Settings and Resources

Apps can have custom App-Settings and App-Resources which every app manages itself. The names/types of these settings can be freely configured, as each App has a Content-Type called App-Settings which can have different fields as needed.

You can also configure the standardized SettingsSystem/ResourcesSystem.

In C#/Razor you can access the Settings Stack using the Settings object and the Resources Stack using the Resources object.


View Level

View Configuration

Each view has View-Configuration containing the name, how it works with data and more.

In Razor you can access basic View information on the CmsContext.View object, like the Identifier or the Edition. See ICmsView

View Configuration was introduced ca. v4 and made accessible to Razor in v12.02

View Settings and Resources

A view can have Views-Settings and View-Resouces which apply to all uses of this View. Since View-Settings could be re-used in various views, the concept more flexible than App Settings/Resources, meaning that you could re-use both the content-type as well as the settings data.

In C#/Razor you can access the Settings Stack using the Settings object and the Resources Stack using the Resources object.


Content-Type Level

Content-Type Configuration

Each Content-Type has Content-Type Configuration with the description, icon and more. The Configuration can be multi-language.

Content-Type Settings and Resources

There are no Content-Type settings or resources.


Attribute (Field) Level

Attribute Configuration

Each Attribute / Field can be configured as needed. The configuration options depend on the Attribute-Type. The Configuration can be multi-language.

Attribute Settings and Resources

There are no Attribute Settings or Resources.


Entity (Item) Level

Entity Configuration, Resources and Settings

An Entity just has the data it caries, and no additional intrinsic Configuration, Settings or Resources. Entities themselves are multi-language.

Per Entity-Use (Item-Use) Settings aka Presentation Settings

Items can have a per-use setting called Presentation - see Content-Presentation. This means that when the item is shown in a specific view, there may be settings which configure how it's to be shown. Since each View may need different settings (a map View could need other presentation-settings than a text/image View) this is specific to each use of an Entity.

Per List-Use Settings aka Header-Presentation Settings

If a View is configured to be a List then it can also have a Header and also Header Presentation Setttings which work just like Content-Presentation.


History

  • View Configuration introduced ca. v4
  • App Configuration, Settings and Resources introduced in v6.0
  • View Settings and Resources introduced in v12.02
  • Site and global settings introduced in 2sxc 12.04
  • Full Settings Stack introduced in 2sxc 12.04
  • Full Resources Stack introduced in 2sxc 12.04