Creating Custom Modules - Adding Module Definitions
(Page 6 of 7 )
When you upload a free or purchased module to your portal by using the host's file manager, the module definitions are added for you automatically. When developing modules, you will want to be able to debug them in the DotNetNuke environment using Visual Studio. This requires you to add module definitions manually.
Adding module definitions makes the module appear in the control panel module dropdown when you are signed on as host or admin. It connects your controls to the portal framework.
To add the module definitions needed for our project:
Hit F5 to run the DotNetNuke solution, log in as host, and click on the Module Definitions option on the Host menu.
Under the Module Definition menu, select Add New Module Definition:

Enter the name for your module and a short description of what it does. When you are finished, click on the Update link:

This will bring up a new section that allows you to add the definitions for the module. Enter the New Definition name and click on Add Definition. This will add the definition to the Definitions dropdown and will bring up a third section that will allow you to add the controls created in the previous section:

First, we will add the View control for the module.
- Click on the Add Control link to start.
- Enter the Title for the control. This is the default title when the control is added to a tab.
- Select the Source for the control from the drop-down list. You will be selecting the file name of our control. This is the View control we created in the last section. Select the control from the dropdown.
- Select the Type of control. This is the control that non-administrators will see when they view your module on the portal. Select View from the dropdown.
- Click Update when done.
Next we want to add our Edit control.

- Enter Edit for the Key field. This is the key that the Actions Menu we created earlier will use to navigate to this control.
- Enter a Title for the control.
- Select the ShopListEdit.ascx control from the Source drop-down list.
- Select Edit as in the Type dropdown.
- Click Update when complete.
Finally we need to add our Settings control.
- Click on Add Control to add the third control for this module.
- Enter Settings for the key field.
- Enter a Title for the control.
- Select the Settings.ascx control from the Source drop-down list.
- Select Edit as in the Type dropdown.
- Click Update when complete.
This will complete the module definition. Your control page will look like the following.

Click on the Home page menu item to exit the module definition section.
Next: Adding Your Module to a Page >>
More Visual Basic.NET Articles
More By PACKT Publishing
|
This article is excerpted from chapter seven of the book Building Websites with VB.NET and DotNetNuke 3.0, written by Daniel N. Egan (PACKT Publishing, 2005; ISBN: 1904811272). Check it out today at your favorite bookstore. Buy this book now.
|
|