Yesterday, we used the DotNetNuke template to create a skeleton module and it’s supporting files. Today, we want to get those modules registered into our Visual Studio copy of DotNetNuke so that as we develop the modules, we can see and test the changes we make.
To register the module, you will need to be logged into DotNetNuke as “host.” Login now and navigate to “Host” > “Portal Module Definitions.”
Once you are there, scroll to the bottom of that page and click the link, “Create Module Definition.” This will lead you to a screen with a lot of fields on it. The first time you come to this screen, you’ll probably wonder how you are suppose to know exactly what you should be doing here. Fortunately, you only HAVE to fill in a small subset.
- Module Name: Give the module a name. In our case, we are calling it DMBSample
- Module Directory: The directory your module is located in. Ours is DMBSample
- Friendly Name: The text that you want to display in the dropdown list of available modules.
- Descriptions: Describe what this module does.
- Version: This is the first version, so leave the field with 01.00.00
- Compatibility: This allows you to specify what version of DNN this module is compatible with. We can leave this blank.
- Dependencies: List the typename dependencies. Again, you can leave this blank for now.
- Permissions: Any special permissions this module requires. Leave it blank for this sample.
- Controller Class: The class that implements ISearchable and IPortable. Don’t worry about this field for right now.
- Premium: Since we are developing this module, we don’t want it to be limited. Leave this unchecked.
Once you’ve filled in those field, click the “Create” link.
But wait, there’s more…
Now that you’ve defined the main module, you need to tell it where the ASCX files are that make the module work. To start this, you’ll need to create a definition. Fill in the “New Definition” field with the name of the module–in our case, “DMBSample”–and click “Add Definition.”
Now we can add the various controls. Click the “Add Control” link that just displayed after the “Add Definition” completed. This will take you to another screen where you can define the control. The first control we will define is the main view, the presentation that the end user will ultimately see. For this, fill in Title with a title that represents the module, select the ViewDMBSample.ascx file from the “Source” dropdown, and leave the “Type” dropdown as “View”. If you plan to use AJAX with your module, select “Supports Partial Rendering”. That’s all you need to do for this control, so click “Update.”
The template created two other controls. One is the “Edit” control and the other is the “Settings” control. You’ll need to add these in a similar manner as the View. Click the “Add Control” link, and for the Edit control, put “edit” in the “Key” field. For the settings control, type “settings” into the “Key” field. Title can be something meaningful. Select the appropriate control from the dropdown. And for type, use “Edit” for the edit control and “Admin” for the setting control.
If you try to add this module to a page at this point, you’ll see an error message. Just hang on for the next lesson where we show you where the controls we just registered show up in the system and modify the code so that it doesn’t throw an exception.
Other post in DotNetNuke - Module Development
- Creating DotNetNuke Modules - May 20th, 2008
- Creating DNN Modules - The Tools - May 22nd, 2008
- DotNetNuke Modules - Foundational Concepts - May 26th, 2008
- DotNetNuke Modules - Creating Base Modules - May 28th, 2008
- DotNetNuke Modules - Registering Your Module - May 29th, 2008
- DotNetNuke Modules - Where Stuff Shows Up - June 3rd, 2008
- DotNetNuke Modules - Anatomy of the View - June 9th, 2008
- DotNetNuke Modules - Adding Actions - June 11th, 2008
- DotNetNuke Modules - DNN Controls - Label - June 18th, 2008
- DotNetNuke - Internationalization - June 25th, 2008
- DotNetNuke Modules - Internationalization (part 2) - June 30th, 2008
- DotNetNuke Modules - Labels w/ no Help - July 9th, 2008
- DotNetNuke Modules - LinkButtons - July 14th, 2008
- DotNetNuke Modules - Collapsible Panels - July 16th, 2008
- DotNetNuke - The Data Layer - Installing CodeSmith - July 22nd, 2008
- DotNetNuke - Modules - Creating The Tables - July 24th, 2008
- DotNetNuke - Modules - Creating Stored Procs - July 29th, 2008
- DotNetNuke - Modules - Portal Specific Modules - July 31st, 2008
- DotNetNuke Modules - Data Access Layer - August 5th, 2008
- DotNetNuke Modules - Data Access Layer - August 7th, 2008
- DotNetNuke - Data Access Layer Alternative - August 12th, 2008
- DotNetNuke - Modules - Linking within the module - August 14th, 2008
- DotNetNuke - Make Your Module Searchable - August 19th, 2008
- DotNetNuke Modules - Making Content Portable - August 25th, 2008
- DotNetNuke Modules - Exceptions the DNN Way - September 2nd, 2008
- DotNetNuke Modules - PortalModuleBase - September 4th, 2008
- DotNetNuke Modules - Inter Module Communication - September 9th, 2008
- DotNetNuke Modules - Finding The Page a Module is On - September 15th, 2008
- DotNetNuke Modules - Caching - September 17th, 2008
- DotNetNuke Modules - Module Settings - September 22nd, 2008
- DotNetNuke Modules - Retrieving Settings - September 24th, 2008
- DotNetNuke Modules - Advanced Architecture - October 20th, 2008
- DotNetNuke Modules - Creating the PA - October 30th, 2008
- DotNetNuke Modules - Automating the PA - November 5th, 2008
- DotNetNuke - FileUploadControl Danger! - February 26th, 2009
- Changing an Existing DNN Module - March 4th, 2010
- Facebook App using DotNetNuke - January 19th, 2012
- DotNetNuke Modules - Install DNN into VS 2008 - June 19th, 2012
- DotNetNuke SecurityException AspnetHostingPermission - February 19th, 2013
- DotNetNuke Modules - Benefits of Architecture - April 9th, 2013
- Debugging TypeScript Under DotNetNuke - May 8th, 2013