Development for Custom DotNetNuke Modules can be handled in a number of ways, particularly using tools like Visual Studio. However, if you are looking to develop a simple module, you can make do without a fancy IDE (Integrated Development Environment) such as Visual Studio. After all, the application itself provides an array of basic tools to help you create your own module.
Step #1: Host > Extensions
After you have selected the Host and right-clicked on Extensions, you will be able to view options from the Module Action menu to setup a new module. If you are using DNN 6 or later, Module Action can be accessed through the Manage button.
Step #2: Module Action > Create New Module
Upon clicking on Create New Module, a form appears for you to use to create your module. The first option is going to be how you want to create your module. Go ahead and choose the New option - once selected, a number of other fields will be displayed.
Step #3: Fill Out the Create New Module Form
You will have to provide values for the fields as mentioned below:
1. The first option allows you to select how to create your new module. As mentioned above, you have chosen New.
2. All modules created are stored in the DesktopModules folder of your website. DotNetNuke provides two levels of folders to create your modules, with the first level being the Owner folder. This is mainly used by commercial developers for their Company Name. You can click on the Add Folder button to create a new Owner Folder if the folder you want doesn’t already exist.
3. The second level is to specify the name of your module.
4. In the next option, you have to select a programming language and provide a name for the Module Control.
5. The name you provide in the Module Name option will be used to identify the module in the application itself. Therefore, it’s better to go with a friendlier name.
6. Lastly, check the Add Test Page box to host the module.
7. Click the Create Module button once you are satisfied with your chosen options.
Step #4: The New Module Deploys on the Page
Therefore, you have created your first module, and now it’s time to edit the source of the module control in order to render the content you want. Select Module Action, and Click on View Source to edit the Module Control’s source.
Step #5: Module Action > View Source
In this drop down menu, you will be able to view all the editable files existing in the Module Folder. To view the rest of the form, go ahead and select one - the User Control.
Step #6: Editing the View Source Form
Once selected, you will come across a text area, which is the actual HTML in the file. You can modify your module by editing this text, but make sure not to remove <% and %> sections in the first few lines as they are required by ASP .NET so they can identify the base class and new of the Class that the UserControl inherits from. Click the Update Source button once you are happy with your changes, and your Custom DNN module is ready!