IMPORTANT: This version of Sitefinity CMS is out of support and the respective product documentation is no longer maintained and can be outdated. Use the version selector to view a supported product version.
After you Locations module: Implement fluent mappings, you need to implement the configuration class, that is, the configuration file is used by the manager class. The configuration class must provide information about the available data providers and the definitions of the frontend and the backend views.
To create a configuration class:
public
class
LocationsModuleConfig : ContentModuleConfigBase
{
}
Use the following code for these members:
protected
override
void
InitializeDefaultProviders(ConfigElementDictionary<
string
, DataProviderSettings> providers)
// add default provider
providers.Add(
new
DataProviderSettings(providers)
Name =
"OpenAccessLocationsDataProvider"
,
Description =
"A provider that stores locations data in database using OpenAccess ORM."
ProviderType =
typeof
(OpenAccessLocationsDataProvider),
Parameters =
NameValueCollection() { {
"applicationName"
"/Locations"
} }
});
InitializeDefaultViews(ConfigElementDictionary<
, ContentViewControlElement> contentViewControls)
// add backend views to configuration
contentViewControls.Add(LocationsDefinitions.DefineLocationsBackendContentView(contentViewControls));
// add frontend views to configuration
contentViewControls.Add(LocationsDefinitions.DefineLocationsFrontendContentView(contentViewControls));
NOTE: The frontend and backend views are defined via definitions. You implement them later in this tutorial. For more information, see Locations module: Create the definitions class.
[ConfigurationProperty(
"defaultProvider"
, DefaultValue =
)]
DefaultProvider
get
return
(
)
this
[
]; }
set
] = value; }
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important