Skip to content

Setup (OrchardCore.Setup)

Recipe Parameters

During setup, all recipes have access to the setup screen values using these parameters:

Parameter Description
SiteName The name of the site.
AdminUserId The user id of the super user.
AdminUsername The username of the super user.
AdminEmail The email of the super user.
AdminPassword The password of the super user.
DatabaseProvider The database provider.
DatabaseConnectionString The connection string.
DatabaseTablePrefix The database table prefix.

These parameters can be used in the recipe using a scripted value like [js: parameters('AdminUserId')].

Recipe Configuration Keys

Custom configuration keys can also be used in the recipe, using a scripted key value like [js: configuration('CustomConfigurationKey')].

The key will be retrieved from the current IShellConfiguration.

For example to provide a key for a tenant

    {
        "ConnectionString": "...",
        "DatabaseProvider": "Sqlite",
        "TablePrefix": "Test",
        "CustomConfigurationKey": "Custom Configuration Value"
    }

Other configuration keys can also be used, i.e. from the hosts appsettings.json

[js: configuration('OrchardCore_Admin:AdminUrlPrefix', 'Admin')]

In this example we also provide a default value, which will be used if the key is not found.

    {
        "OrchardCore_Admin" : {
            "AdminUrlPrefix" : "MyAdmin"
        }
    }

Setup Configuration

The following configuration values are used by default and can be customized:

    "OrchardCore_Setup": {
      "DefaultCulture": "", // When using "" the system OS culture will be used
      "SupportedCultures": [
        "ar", 
        "cs", 
        "da", 
        "de", 
        "el", 
        "en", 
        "es", 
        "fa", 
        "fi", 
        "fr", 
        "he", 
        "hr", 
        "hu", 
        "id", 
        "it", 
        "ja", 
        "ko", 
        "lt", 
        "mk", 
        "nl", 
        "pl", 
        "pt", 
        "ru", 
        "sk", 
        "sl", 
        "sr-cyrl-rs", 
        "sr-latn-rs", 
        "sv", 
        "tr", 
        "uk", 
        "vi", 
        "zh-CN", 
        "zh-TW"
      ] // "" value (InvariantCulture) is not supported for these
    }
Key Description
DefaultCulture The default culture that will be used for the setup screen.
SupportedCultures The list of the supported cultures for the setup screen.

Last update: November 22, 2020
Authors: Dean Marcussen, Jasmin Savard, Sipke Schoorstra