Our.Community.Configuration

PlatformGitHub

Store configuration data in the Umbraco database.

This plugin allows you to store configuration data in a custom table in the Umbraco database.

Supported data types

  • Strings (can be encrypted)

  • Numbers

  • Booleans

Dashboard

Settings Dashboard

Add Property

Add Property

Access properties in code

To access your settings you will need to inject the configuration service.

IOurConfiguration ourconfig

Retrieving config data

// Fetch a single config setting
OurConfigDataSchema setting = ourconfig.Get("propAlias"); 
//Fetch ALL config settings
IEnumerable<OurConfigDataSchema> settings = ourconfig.GetConfig(); 
//Fetch config settings for a specific group
IEnumerable<OurConfigDataSchema> settings = ourconfig.GetConfigByGroup("TESTGROUP") 

Getting a value

var propValue = setting.Value();

Returns an object of the required type (string,int,bool). If the property is flagged as encryted, using the setting.Value() function will return the decrypted value. 

OurConfigDataSchema

Property

Type

Description

Id

int

The unique identifier for the configuration entry

Alias

string

The unique alias used to retrieve the setting

Name

string

The display name of the setting

Value

string

The stored value (encrypted if Encrypted is true)

DataType

string

The data type of the value (string, int, bool)

Group

string

The group the setting belongs to

Encrypted

bool

Indicates whether the value is stored with encryption