Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Some newbie quick questionsSome newbie quick questions
Previous
 
Next
New Post
5/31/2006 7:08 AM
 
Right, I just had my first attempt at making a module. And it all went to heck, as expected

Now, for my second (and more serious) attempt, I thought I'd ask you for a few pointers...

For starters, I will not need to use any module IDs or portalIDs in my module, since all data will be based on a well structured and ready-to-use SQL table. But do I need to use the moduleIDs in some way even though it's not required in the SQL table to avoid "breaking" DNN?

I used the code from the adef tutorial (http://adefwebserver.com/DotNetNukeHELP/DNN_Module4/DotNetNuke_module_6.htm)
 as a base for my first attempt, is this a good code base to use or are there any better examples for DNN4 module development?
I found it a bit hard to follow the code at times, some things weren't that easy to understand.


I'lll fill in with more questions as they spring up, would be glad if someone could throw a quick reply (or as quick as it can on these moderated forums).
 
New Post
5/31/2006 1:03 PM
 

If you don't use PortalID and ModuleID, every instance of your new module will be exactly the same, winhin the portal and across all portals that are being hosted by DotNetNuke. In addition, you may want your module to appear differently based on something other than module settings. It would be like having a Text/HTML module with preloaded text that always appears the same on any page on any portal. You can display the module on every page of your site if you wish with standard modules settings but I have rarely seen it used in actual portals.

If you are only going to use one portal you may not need the PortalID. If you to intend to use the same module on more than one page (as per usual) you must use the ModuleID.


Dwayne J. Baldwin
 
New Post
6/1/2006 2:22 AM
 
Thanks for the reply.

Thing is that I have a table in which I already have a set of unique keys in my table. Can I control what my moduleID is, or does the added modules just get assigned a random moduleID when it's added to a page? If the only way to keep track of where a module is located, should I lock each moduleID to a primary key in the table?

My thought was to keep a setting in the module for which primary key it corresponds to, and thereby keep it from needing to use the moduleID (I'm a fan of keeping information separated from the presentation). For example, when I add a "personel" module I want a setting in which I get to choose which department it should show (the table has a department field).
 
New Post
6/1/2006 6:58 AM
 

It is quite difficult for me to imagine your database schema, but perhaps I can explain it in another way.

A moduleID is reference to an instance of a module, somewhat like an item's storage location in a warehouse. The location id is always the same, but an item cam be moved to a different location just by changing the item.location.

In the case of DotNetNuke, a ModuleID is issued when you add a new module. When you add that module to a page, it is referenced by the ModuleID. DNN uses this technique so that you can use the same base module on different pages, each with its own unique settings.

The bottom line is that if you are developing a module, you should follow the best practice that DNN has already implemented for you. Does that make more sense?


Dwayne J. Baldwin
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Some newbie quick questionsSome newbie quick questions


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out