More in this section
Blogs RSS feed

Sample pluggable module: Contacts pluggable module

by Ivan Osmak

[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"
            <add name="Sitefinity" securityProviderName="" type="Sample.Contacts.Data.DefaultProvider, Sample.Contacts.Data" connectionStringName="DefaultConnection" visible="true" /> 
  • 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.


Leave a comment
  1. Gary Haywood Feb 27, 2009
    Thanks Ivan,

    Any reason for not using Open Access in your sample?
  2. Ivan Mar 03, 2009
    Hi Gary,

    well... first of all, we had this module with Nolics DAL already, so it seemed faster. Also, OpenAccess will become part of Sitefinity in 4.0, so we did not want to confuse matters more. But, I think that you are right and we should provide OpenAccess DAL for this module as well, when time allows...
  3. Jeremy Mar 09, 2009
    Can we please get a bare bones intrasite module example.  Learning your new system from the extreme overkill pluggable example is almost impossible (hard to filter out exactly what is needed and what is not).  I so wanted to upgrade to 3.6 but as usual the documention severly lags the implementation.
  4. sam Mar 10, 2009
    I also agree. I have implemented 3.6 and can't go ahead until I get a basic example. The contacts module is truely overkill..
  5. Ivan Mar 10, 2009
    Hi guys,

    we will provide an intra-site sample shortly, but there is really not a whole lot to it. Basically you create a module class and control panel class (just as in contacts module sample) but you put the classes in App_Code instead of in a separate project. And then you add Views that are based on ViewModeUserControl base class (User Controls) and that's it.

    You can find samples for adding Views based on User Controls here:

    I hope you find this helpful.

  6. Bo Godthaab Mar 26, 2009
    Hi Ivan,
    When I try to run a "Build Solution" I get errors such as Error 101 The type or namespace name 'IDepartment' could not be found (are you missing a using directive or an assembly reference) C:\Sitefinity3.6\SF_Moduler\Contacts\Sample.Contacts.Data\Department.cs Line 9 Column 3 Sample.Contacts.Data. 

    What do I do wrong? I believe I have followed the instructions 100%.
  7. Bob Mar 30, 2009
    The CssClass property in ContactsList gets flagged as hiding the same property from WebControl.  Assuming I can just remove this, thought you might want to update the sample as you can also remove AddAttributesToRender
  8. Tony Archer Apr 02, 2009
    Ivan,  Thanks for all the great examples you are always providing us, I just have one request (which I have of most of the folks at telerik)

    To me a picture is worth 1000 words.  I'd love to see a screenshot or two (or a working example) of the final result as well as just the code.  Because for me that picture can save me a bunch of time determining whether to dig into the code and implement now or wait till another day (how closely does it match what I am trying to do).
  9. Ivan Apr 03, 2009
    @Tony Archer

    Tony, thanks for the great suggestion. I completely agree with you I should really post screenshots. I'll keep that in mind for the future samples.
  10. Ivan Apr 03, 2009
    @Bo Godthaab

    Hi Bo, have you referenced Sample.Contacts project from the Sample.Contacts.Data? I might have forgotten to mention that, however, that should fix your problem. Sorry for the inconvenience.
  11. Ivan Apr 03, 2009
    @ Bob

    Thanks Bob for pointing this out. Yes, you can remove it safely. I am not really sure why is that property there :). I'll update the sample when I get some time.
  12. Gilbert Sep 17, 2009
    Looks like you are missing the resource folder or renamed something.
    We got this part working here perfectly.

    Our main question is how to apply Workflow to this example.

    Leave a comment