|
||
The web.config of your Kentico CMS application may be used to map providers and helpers to custom classes that are included in your web project, i.e. either in a separate assembly or under the App_Code folder. To do this, please follow the steps described below:
1. Edit your web.config file and add the following into the <configSections> element:
<?xml version="1.0"?>
|
This defines a new extensibility section, where you can register custom providers and helpers.
2. Next, create the actual <cms.extensibility> section under the <configuration> node and add any necessary providers or helpers into the appropriate sub‑sections:
...
... </configuration> |
As you can see, each custom class is assigned to a provider or helper through its own <add> element with the following attributes:
•name - must match the name of the provider/helper class that you wish to customize (without the extension).
•assembly - specifies the assembly where the custom class is defined. Set the value to App_Code for classes located in this folder (even on web application installations, where the actual name of the folder is Old_App_Code).
•type - used to specify the name of the custom class. If your custom class is in the App_Code folder, the value of this attribute will be passed in the ClassName property of the ClassEventArgs parameter, which is available for the onGetCustomClass event handler (as can be seen in step 3 of the Customizing providers from the App_Code folder topic).