-
Notifications
You must be signed in to change notification settings - Fork 147
CMS configuration
Note: Default values (in the example) are provided when installing the Better CMS 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 resource (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 URLs (e.g. file download URLs). Default value:Auto. When usingAuto, the current web site URL is used. -
pageNotFoundUrl: string. CMS page for 404 errors. Leave empty if custom errors are used in web.config. 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, this line indicates what CSS class name should be used for rendering DIV. Default value:bcms-clearfix. -
enableMultilanguage: boolean. IfenableMultilanguageis set to true, this line indicates that multilanguage should be enabled (read more here). -
enableMacros: boolean. IfenableMacrosis set to true, an additional field will be available while editing sitemap nodes that can be used to store custom data needed for your web application.
Example:
<cms
useMinifiedResources="false"
resourcesBasePath="(local)"
webSiteUrl="Auto"
pageNotFoundUrl="/404/"
workingDirectoryRootPath="~/App_Data/BetterCms"
articleUrlPattern="/articles/{0}/"
urlMode="TrailingSlash"
renderContentEndingDiv="false"
contentEndingDivCssClassName="bcms-clearfix"
enableMultilanguage="true"
enableMacros="true" >-
urlPatternscollection. By default, the expression/(bin|app_code|app_globalresources|app_localresources|app_data|app_browsers|theme)/is added. URL patterns are used for preventing the 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>The users section is only added if BetterCMS.Module.Users is installed.
-
createDefaultUserOnStart: boolean. If set to true, Better CMS will check for existing users upon initial start up. If no users exist, the user well be redirected to the user registration form, where a new 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" />The 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 an additional setting with the key typeName and value with reference to the 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. Indicates role name(s) that will have full access. Default value:Owner. -
encryptionEnabled: boolean. Determines if HTML content encryption is enabled. If set totrue, HTML content and HTML widgets content are encrypted usingencryptionKeykey. Default value:false. -
encryptionKey: string. IfencryptionEnabledis set totrue, this key is used 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>The customRoles section is used for mapping custom roles to Better CMS roles. Read more about roles mapping here.
For example:
<security fullAccessRoles="Owner">
<customRoles>
<add permission="BcmsEditContent" roles="User" />
<add permission="BcmsPublishContent" roles="User" />
<add permission="BcmsDeleteContent" roles="User, Admin" />
<add permission="BcmsAdministration" roles="Admin" />
</customRoles>
</security>
Search configuration is discussed in the Lucene search module setup instructions and Google site search module setup instructions.
It is possible to specify if the "Add to sitemap" dialog needs to be shown after page creation, clone and translation. Sitemap configuration should be placed under modules section within pages module.
Available attributes:
-
enableAddNewPageToSitemapAction: boolean. Indicates if the dialog needs to be shown after page creation. -
enableAddNewTranslationPageToSitemapAction: boolean. Indicates if the dialog needs to be shown after page translation. -
enableAddClonedPageToSitemapAction: boolean. Indicates if the dialog needs to be shown after page cloning.
Example:
<modules>
<module name="pages">
<add key="enableAddNewPageToSitemapAction" value="true"/>
<add key="enableAddNewTranslationPageToSitemapAction" value="false"/>
<add key="enableAddClonedPageToSitemapAction" value="false"/>
</module>
<!-- ... -->
</modules>