What's Module Definition?

A Module must have at the least 1 definition in an effort to show the default view handle in module. Far more more than, Module is collection of module definitions, that contains group of controls (View, Edit, Settings). When a module is installed towards the tab, each of the definitions are installed to it and default or view controls from all the definition is visible for the tab.


But why do I require it?

If you desire to display your module views in diverse panes!

I don't get you!

Well what will you do for those who have a two column layout (skin) and also you are asked to show recent posts within the side bar pane and recent comments at the bottom of content pane?

I'll produce two diverse modules!

No, that's not a proper method to do it! Module definitions are simply to do that kind of factors. Making two different module and after that producing a module package for both of them and installing them individually just isn't an effective way. Logically, your current posts' view and current comments are element of the weblog module and by installing blog module you'll be capable of install both of them in any pane of skin you need.

Ok, But I can just add the current comments in the bottom of my posts within the ascx handle, why do I develop a separate view for it?

Nicely, what if client ask you to move it to sidebar? separating the issues will allow client to complete it him self!

Oh I see! So, I have to create two view controls inside the module and just generate two separate definitions for each of them.

Proper. That's the right strategy to do it.

Ok, and what If I need to add "New Post" link to both on the module definitions?

Nicely, it is possible to generate a single edit sort of manage and also you have to add the control's link to both in the view controls and add the edit control to both definitions. But note that in case you are using module id this may not perform. Module ID for both of them is going to be various.

[But most of the time, you'll not do that in DNN, you'll location edit hyperlink for the view that is most relevant.]

And what about settings, can I share settings of module between them?

Nop, you cannot share it. installing every single definition will generate a new module id. and settings are stored by module id so technically, you do not have facility to complete this by design and style. That tends to make sense, For instance, if you want to show unapproved comment's list to the blog owner, and modify the setting for that definition, that will not influence the weblog list and current post list.

Best DotNetNuke Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers DotNetNuke hosting starts from $5/month only. We also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable DotNetNuke Hosting, we should be your best choice.