Home » DotNetNuke - Module Development » DotNetNuke – Modules – Portal Specific Modules

DotNetNuke – Modules – Portal Specific Modules

misc_vol3_033 Many of you won’t care too much about creating Portal Specific Modules because you’ll be creating modules for an environment that only has one portal. However, if you are creating a module for resell, or you will be using the module in a multi-portal environment, you’ll need this next piece of information I’m going to give you.

In fact, I should have given you this information when I told you how to set up your databases. Sorry.

Each module instance will have its own module ID. What this means to you as a developer is that your top-level table(s) need to have a ModuleId field (integer) that can be filled with the module ID the data should be associated with.

This will allow you to install the module multiple times on your site or on multiple portals without having the data conflicting with the other instances or other modules.

You might also want to put the PortalId in all of your tables so that it is easy to remove data when a table is removed. Or you might want to implement a cascading delete. That part of the implementation is totally up to you.

The important point is that you need to have some way of associating the data in your database with the portal it should display in. Adding the ModuleID field is how you do this.

Thanks to Charles Nurse for his help with this topic

 

Other post in DotNetNuke - Module Development

Like this Article? Subscribe to get every article sent to your email.

Related Post

  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it […]
  • DotNetNuke Modules – Exceptions the DNN WayDotNetNuke Modules – Exceptions the DNN Way Everyone knows (or should know) that handling exceptions is  a fundamental feature of the .NET environment.  And most of the time if we don't handle the exception ourselves the .NET […]
  • DotNetNuke – Data Access Layer AlternativeDotNetNuke – Data Access Layer Alternative Now that I've explained the standard way of creating a Data Access Layer (DAL) for DotNetNuke, we can address the alternative method of providing this same functionality.You see, the only […]
  • DotNetNuke Modules – Registering Your ModuleDotNetNuke Modules – Registering Your Module 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 […]
  • DotNetNuke Modules – Where Stuff Shows UpDotNetNuke Modules – Where Stuff Shows Up We continue our series on creating DotNetNuke modules today by showing you where the various components of the module we created last week show up in DotNetNuke.Remember, last […]

About Dave Bush

Dave Bush is a Full Stack ASP.NET developer. His commitment to quality through test driven development, vast knowledge of C#, HTML, CSS and JavaScript as well as his ability to mentor younger programmers and his passion for Agile/Scrum as defined by the Agile Manifesto and the Scrum Alliance will certainly be an asset to your organization.

  • http://www.xboard.us/showthread.php?p=8717718 imasymoreisa

    favorited this one, man