-
Notifications
You must be signed in to change notification settings - Fork 148
CMS configuration
NOTE: Default values, provided in the example, are these, which are provided, when installing BetterCMS NuGet package.
cms section attributes:
-
useMinifiedResources: boolean. Indicates, if minified resource files (CSS/JS) should be used. Default value:true. -
resourcesBasePath: string. The path for resources (CSS / JS) files. USe(local)for local resources (from Better CMS dll's). Default value://d3hf62uppzvupw.cloudfront.net/{bcms.version}/. -
webSiteUrl: string. Used for generating full URL (e.g. file download URLs). Default value:Auto. When usedAuto, current web site URL is used. -
pageNotFoundUrl: string. CMS page for 404 errors. Leave empty, if custom errors in web.config are used. Default value:/404/. -
workingDirectoryRootPath: string. Folder, where CMS creates system files (e.g. data migrator versions info file). Default value:~/App_Data/BetterCms. -
articleUrlPattern: string. Default value:/articles/{0}/. -
urlMode: string. Indicates, how page URLs should be stored in the database. Possible values:NoTrailingSlash(e.g. /my-page - last slash is trimmed by default),TrailingSlash(e.g. /my-page/ - last slash is added by default),Mixed(e.g. /my-page/ or /my-page).Default value:TrailingSlash. -
renderContentEndingDiv: boolean. Indicates, if content-end DIV should be rendered, when in non-edit mode. Default value:true. -
contentEndingDivCssClassName: string. IfrenderContentEndingDivis set to true, indicates, whiat CSS class name should be used for rendering DIV. Default value:bcms-clearfix.
Example:
<cms
useMinifiedResources="false"
resourcesBasePath="(local)"
webSiteUrl="Auto"
pageNotFoundUrl="/404/"
workingDirectoryRootPath="~/App_Data/BetterCms"
articleUrlPattern="/articles/{0}/"
urlMode="TrailingSlash"
renderContentEndingDiv="false"
contentEndingDivCssClassName="bcms-clearfix" >-
urlPatternscollection. By default, expression/(bin|app_code|app_globalresources|app_localresources|app_data|app_browsers|theme)/added. Url patterns are used for preventing creation of page paths, which contain invalid folders (e.g. IIS blocks all paths, which contains /bin/, /app_code/, etc. )
Example:
<urlPatterns>
<add expression="\/(bin|app_code|app_globalresources|app_localresources|app_data|app_browsers|theme)\/" ignoreCase="true" negate="true" description="{0} cannot contain these as directories: bin, App_Code, App_GlobalResources, App_Localresources, App_Data, App_Browsers, Theme" />
</urlPatterns>users section is added only if BetterCMS.Module.Users is installed.
-
createDefaultUserOnStart: boolean. If set to true, when CMS starts first time, it checks, if any user exists. If not, user is redirected to user register form, where user with admin roles can be created. -
enableCmsFormsAuthentication: boolean. If set tot true, routes/loginand/logoutare registered and user login form is provided.
Example:
<users createDefaultUserOnStart="true" enableCmsFormsAuthentication="true" />installation section is used to configure, which pages are installed by default, when running Better CMS for the first time. Later this section can be deleted.
-
Install404ErrorPage: boolean. If set to true, the page with url/404/is installed. Default value: true. -
Install500ErrorPage: boolean. If set to true, the page with url/500/is installed. Default value: true. -
InstallDefaultPage: boolean. If set to true, the page with url/is installed.Default value: true.
Example:
<installation Install404ErrorPage="true" Install500ErrorPage="true" InstallDefaultPage="true"></installation>Storage configuration is discussed here.
cache section attributes:
-
enabled: boolean. Default value: true. -
cacheType: string. Possible values:HttpRuntime(cache is saved to memory),Auto(using CMS caching providers. For example, BetterCms.Module.AppFabricCache module can be used, if it's installed),Custom(custom caching providers).Default value:HttpRuntime. -
timeout: .
When cacheType is set to Custom, add additional setting with key typeName and value with reference to custom cache engine:
<cache enabled="true" timeout="00:10:00" cacheType="Custom" >
<add key="typeName" value="BetterCms.Sandbox.Mvc4.Custom.CustomCacheTest, BetterCms.Sandbox.Mvc4" />
</cache>
database section attributes:
-
schemaName: string. Default dabatabase schema name. Default value:dbo. -
connectionStringName: string. Connection string name, refering to configuration section'sconnectionStringsitem.Default value:DefaultConnection. -
databaseType: string. Possible values:MsSql2008,MsSql2005,MsSql2000. Default value:MsSql2008.
Example:
<database schemaName="dbo" connectionStringName="BetterCms" databaseType="MsSql2008" > </database>security section attributes:
-
accessControlEnabled: boolean. Indicates, if access control security is enabled. Default value:false. -
fullAccessRoles: string. Role name(s), which will have full access. Default value:Owner. -
encryptionEnabled: boolean. Determines, if HTML content encryption is enabled. If set totrue, HTML contents and HTML widgets contents are saved encrypted usingencryptionKeykey. Default value:false. -
encryptionKey: string. IfencryptionEnabledis set totrue, using this key to encrypt / decrypt saving / loading content.
defaultAccessRules configuration section attributes:
-
defaultAccessLevel: string. Possible values:ReadWrite,Read,Deny. Default value:ReadWrite. Defines default access level for object with no access rules when access control is enabled.
defaultAccessRules items attributes:
-
identity: string. User name or role name. -
accessLevel: string. Possible values:ReadWrite(user/role can edit content),Read(user/role can only read content),Deny(content is denied for user/role). Default value:ReadWrite. -
isRole: boolean. Indicates, if identity is user, or role.
By default, role 'Everyone' with 'Deny' access level and role 'Authenticated Users' with access level 'ReadWrite' are added. Example:
<security accessControlEnabled="true" fullAccessRoles="Owner" encryptionEnabled="false" encryptionKey="bettercmstest">
<defaultAccessRules defaultAccessLevel="ReadWrite">
<add identity="Everyone" accessLevel="Deny" isRole="true" />
<add identity="Authenticated Users" accessLevel="Read" isRole="true" />
</defaultAccessRules>
</security>Search configuration is discussed in the Lucene search module setup instructions and Google site search module setup instructions.