DNN Installable Module 07Oct, 2015

DNN Platform is an open source software that is intended to allow management of websites without much technical knowledge, and to be extensible through a large number of third-party apps to provide functionality not included in the DNN core modules. Skins can be used to change the look of a website using DNN.

MODULES:
The default functionality of DotNetNuke can be expanded by adding third-party modules, either from an existing library of modules, or through in-house development of custom functionality. The DotNetNuke framework provides basic functionality such as security, user administration, and content management, while modules are used to tailor the website for specific deployment needs.

DNN Modules can be created by various ways but one of the most popular way is by using Christoc’s templates. For setting up the Christoc’s templates to work with visual studio you have to install the Christoc template from the nu-get package manager or you can download the installer from codeplex to set up the development environment that works with Christoc Module. When the Christocs module will be installed in your visual studio you will see the option of DotNetNuke in Visual c# templates. You will be then able to create new installable modules using these templates, but first you have to set up the development environment for the same.

After Installing the Christocs Module you will have the DNN Module Templates listed like below –

1

Setting up the development environment for Christocs templates:

Find the host file that is located at : C/windows/system32/drivers/etc/hosts.
Add local host binding at the last in the host file as:

127.0.0.1                   dnndev.me

Your Host File will look something like this –

2

You will have to install the DNN website with the name dnndev.me in your IIS.

For installing:

Please download the latest version of DNN from DNN Website and place it in a folder :C/Websites/dnndev.me (Create the websites folder in c Drive).

Create a website in IIS with the same name (dnndev.me) and the same physical path (mentioned in the above step).

When the site is hosted, right click on the website name, go to edit bindings and then add a binding to the site by the name dnndev.me and port 80.

The Binding screen will look something like this –

3

When the website is created in IIS, click on the website and click on .Net Compilation, from behavior
change debug = True.

It will look like this –

4

We are all set to develop the Installable module.

Creating the First Installable module:

For creating an installable module –

Open Visual Studio and then create a new project by choosing the DNN Installed template. In location, be careful to give the location of the desktop modules folder of the site which was hosted by us earlier.
Browse the folder- c/Websites/dnndev.me/desktopModules/

Just like this

5

Click on the ok button to create your project. After the creation of project,
right click on properties and add the start URL – http://dnndev.me in the web section and then check the Override application root URL.

Your First Installable Module will be created. You can code your working logic here and explore the working of Installable module.

Installing the Module:

To Install the module, change the debugging mode to release mode.

The screen Shot is provided below –

6

When you will build the solution after selecting the release mode then a folder named install will be created in the Project Folder.
The install folder will contain two files:

<ModuleName>_<version>_Install.zip.
<ModuleName>_<version>_Source.zip.

For example: If we create a module named ModuleDepartments then the folder will look something like this –

7

Open the website, login as an administrator,
Goto Hosts > Extensions > Install Extension Wizard.
Browse to the Install folder with in the project directory/desktopmodules and choose the <ModuleName>_<version>_Install.zip file.

Follow the instructions and the module will be installed to the DNN Site.

Posted by: Ramandeep Gosal / In: Dot Net and Tagged , ,
Cam

Leave a Reply

Your email address will not be published.