Sitefinity

Concepts Send comments on this topic.
Modules > Custom Modules > Pluggable Modules > Building the Contacts Pluggable Module > Concepts

Glossary Item Box

What is a Sitefinity Module?

Modules are quite probably the most powerful feature of Sitefinity. They allow you to extend Sitefinity in any way you need it to be extended. Need an image gallery on your site? How about a blog aggregation tool? Or maybe product catalog? All this could be achieved by taking advantage of Sitefinity. Site navigation, an administration area, an approval system - all this is provided by Sitefinity. That means only a particular functionality needs to be added in order to customize the Web site. This is done by adding a module.

 

Asp.NET Practices

The architecture of modules is following all the best practices of ASP.Net. In addition to that, an intuitive architecture will aid into building easy-to-maintain-and-extend modules. Still, at the beginning, there are several fundamental aspects of Sitefinity Modules that need to be well-understood.

 

Concepts

Modules are integrated in the Sitefinity Modules section as assemblies. This means that in order to create your own module a new C# project (Class library) should be created first.  This class needs to inherit the Telerik.WebModule class.

In order to appear on the modules page and be usable, the module needs to be registered in the web.config file. Put the resulting .dll file in the bin folder of the Web site.

 

The module itself has two fundamental sides:

  • Administrative -  the side you see in the modules part of Sitefinity (also called the Admin part)
  • Public - the side which consists of the controls that users can drag onto the page in order to take advantage of the new module.

Take a look at Figure 1 below to get a better understanding of this distinction:

 

Figure 1 

 

This topic will mostly concentrate on the Administrative side of the module. The Public part will be covered in the next topics. The administrative side of the module can be further divided into two more sections:

  • Command Panel
  • Control Panel

 

To understand this separation better, think of the command panel as the “left side” and the control panel as the “right side” of the screen. In essence, the Command Panel (left side) is really just to facilitate the Control panel (right panel) with sub navigation. Take a look at Figure 2 to get a clearer picture:

 

Figure 2

 

So, use the core class of a module (the one that inherits from a WebModule class) as a container to hold the two other controls you will create: the CommandPanel and ControlPanel controls. What will those two classes do is completely up to you and depends on what your module is supposed to do.

 

Next Topic

In the topic Setting up the Project you can read how to create the two basic controls, namely CommandPanel and ControlPanel controls.