Sitefinity

Simple Intra-site Module Send comments on this topic.
See Also
Developing with Sitefinity > Modules > Adding New Modules to Sitefinity > Intra-site Modules > Simple Intra-site Module

Glossary Item Box

Simple Intra-Site module is an Intra-Site module implementation of the Contacts module. This module does not implement provider model pattern or security and is meant to demonstrate quick and simple way to create new modules for Sitefinity.

 

Download the Sample Code from here.

For data access, this sample module uses SqlDataSource controls. This, of course, means that you will need to create the database tables manually (as opposed to Nolics.NET forward engineering feature).

 

What is Supplied in This Sample?

In the App_Code folder you will find:

  1. ContactsModule.cs – the main module class
  2. IContactsControlPanel.cs – interface mandating some members on Contacts Control Panel class

 

In App_Data folder you will find the Sitefinity.mdf database – the sample database used for this project. The two important tables in this database are:

  1. sample_Contacts – table holding the contacts data
  2. sample_Departments – table holding the departments data

 

In the ContactsModule folder you will find the user interface elements of Contacts module:

  1. Admin folder – user controls for admin side of the module
  2. ControlPanel.ascx and ControlPanel.ascx.cs – user control representing Control panel
  3. CommandPanel.ascx and CommandPanel.ascx.cs – user control representing Command panel
  4. Scripts folder – external java script files used by the module
  5. CommandPanel.js – implements certain client-side functionalities of Departmens treeview
  6. ContactsList.ascx and ContactsList.ascx.cs – represents public control for displaying list of controls
  7. SingleContact.ascx and SingleContact.ascx.cs – represents public control for displaying single contact
  8.  

    How to Install the Sample?

    1. Create a new Sitefinity Web site.
    2. Download the sample code from here.
    3. Copy the App_Code folder from the sample to your Web site.
    4. Copy the Sitefinity.mdf database from App_Data folder from the sample to the App_Data folder in your Web site.
    5. Copy the ContactsModule folder from the sample to your folder.
    6. Run the Web site.

     

    Download the Sample Code from here.

    See Also