Installing a module from the SDK in your website
- Open the Sitefinity SDK Browser.
- On Samples tab, select the module, which you want to install.
- In the right pane, click Run sample in browser button.
- Select your license.
- Select the folder where you want to extract your samples and click OK.
On Database Management Tool window, your server is automatically detected.
- Click Test Connection button and, if the connection is successful, click OK.
The sample module opens a new project in the browser.
- Click Go to the back-end.
The credentials for the new project are automatically created. As username, enter admin, as password, enter, password.
Sitefinity backend opens.
- In your SDK browser, select the sample module and click Open in Visual Studio on the right.
- Open the context menu of your module’s solution and click Open Folder in Windows Explorer.
- Go to the root folder of the sample module.
- Select and copy your module’s folder and folder Telerik.Sitefinity.Samples.Common folder.
For example, if you are installing the Locations module, copy folder LocationsModule and folder Telerik.Sitefinity.Samples.Common.
- Close the Visual Studio, where the sample module is opened.
- From Sitefinity Project Manager, select your project and click Edit in Visual Studio.
Your project opens in Microsoft Visual Studio.
- Open the context menu of SitefinityWebApp and click Open Folder in Windows Explorer.
- In folder Projects, paste the copied folders.
Go back to the Visual Studio, where your project is opened.
- Open the context menu of SitefinityWebApp and click Add » New Item…
- In the left pane, select Web, in the center pane, select Global Application Class.
- In the application class that appears on the left, add the following:
protected void Application_Start(object sender, EventArgs e)
{
Bootstrapper.Initializing += new EventHandler<Telerik.Sitefinity.Data.ExecutingEventArgs>(Bootstrapper_Initializing);
}
void Bootstrapper_Initializing(object sender, Telerik.Sitefinity.Data.ExecutingEventArgs e)
{
if (e.CommandName == "RegisterRoutes")
{
SampleUtilities.RegisterModule<T>("Module Name");
}
}
In the above code sample, substitute T with the type of your module class and Module Name with the name of the module that will appear in the backend.
For example, if you are installing the Locations module the line looks like the following:
SampleUtilities.RegisterModule<LocationsModule.LocationsModule>("Locations");
- In the context menu of your solution, click Add » Existing Project…
- Open folder Telerik.Sitefinity.Samples.Common, select the project file and click Open.
- In the context menu of you solution, click Add » Existing Project…
- Open the module’s folder, select the project file and click Open.
- Under SitefinityWebApp, open the context menu of References and click Add Reference…
- On Projects tab, select the module and Telerik.Sitefinity.Samples.Common and click OK.
- Save and close Microsoft Visual Studio.
- Run your project in the backend to verify that the module is working properly.
Related topics:
Feedback