Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easiest way to create a Module in DotNetNuke 6 and to debug

Can I avoid all the packaging and just create a Web application with a .ascx file and use that? The closest thing I can find is this article which is for 5.1 and does not completely work for v6.

http://mestanzasoft.wordpress.com/2011/03/27/creating-a-dotnetnuke-dnn-module-with-an-ascx-control/

So if there is a more up to date tutorial for v6 let me know please.

like image 353
punkouter Avatar asked Dec 13 '22 10:12

punkouter


2 Answers

You should be able to choose Create New Module from the Host -> Extensions page, and then choose the control (which, I think, is what the blog post said). What specifically isn't working?

One thing that may be an issue you're running into is that the control needs to inherit from IModuleBase (probably via PortalModuleBase). You can't just drop a control that knows nothing about DNN in the website and get DNN to make it into a module (though you can make a thin wrapper around a control like that).

like image 82
bdukes Avatar answered Mar 23 '23 00:03

bdukes


Yes you can.

If you go to Host > Module Definitions and click on Create New..., you will find there are there ways to create a new module:

  • New : That will allow you to create a simple module with single view control. You have to provide module information and create parent folder to do this.
  • Control: This will allow you to create new module from a control. If you don't want to create a new module folder and control at UI, you can just add a new folder to desktopmodules folder and drop an ascx control which inherits from DotNetNuke.Entities.PortalModuleBase and then use this option to provide correct folder and control that you have created and you are done.
  • Last option is to create it using manifest and generally useful when you want to split single module with multiple definition to different modules.

Please let me know if you have more questions.

Thanks

like image 30
Prashant Lakhlani Avatar answered Mar 23 '23 00:03

Prashant Lakhlani