[This post is part of the developer's manual preview published on this blog. You can find temporary TOC here.]
In this topic we are providing sample pluggable module built on new backend architecture introduced in Sitefinity 3.6. The sample module is Contacts module which will be familiar to the long time Sitefinity developers, since we had this sample for previous versions as well.
You can download the module from here.
To set up the module with your Sitefinity website in Visual Studio, please follow these steps:
- Download the project from here and uncompress it on your hard drive.
- Create a new Sitefinity website or open an existing one.
- Copy the following file from the project you have downloaded:
and paste it to this location in your website
- Open the web.config file of your website and following configuration section in the telerik sectionGroup (you can consult the web.config file that came with the project for a reference):
|<section name="contacts" type="Sample.Contacts.Configuration.SectionHandler, Sample.Contacts" requirePermission="false"/> |
- Register the contacts module with Sitefinity by placing following line in the modules collection (you can consult the web.config file that came with the project for a reference):
|<add type="Sample.Contacts.ContactsModule, Sample.Contacts" /> |
- Declare the contacts configuration element as a direct child of the telerik configuration section by pasting following declaration:
|<contacts defaultProvider="Sitefinity"> |
| <providers> |
| <clear/> |
| <add name="Sitefinity" securityProviderName="" type="Sample.Contacts.Data.DefaultProvider, Sample.Contacts.Data" connectionStringName="DefaultConnection" visible="true" /> |
| </providers> |
| </contacts> |
- Add Sample.Contacts and Sample.Contacts.Data projects to your solution.
- Reference Sample.Contacts and Sample.Contacts.Data projects from your website (right click on the website, left click on the “Add Reference…”, select “Projects” tab, select both “Sample.Contacts” and “Sample.Contacts.Data” projects and click “Ok”).
- Build solution (press F6).
- Run the website.