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.0Creating a module: where to place configuration infoCreating a module: where to place configuration info
Previous
 
Next
New Post
6/10/2009 11:50 AM
 

 Hello,  

I did some looking around, but have yet to find good information/tutorial of sorts that shows where I can put my configuration info for my module.  For example, an xml file where I can add module config data -- or better yet, allow the admin of the site to configure this data via the web browser.   My DNN module dev is still fresh, so a URL that someone may know of that shows this would be great!

Thanks,

John

 
New Post
6/10/2009 2:11 PM
 

Most modules store configuration information as string key/value pairs in either the DNN ModuleSettings or TabModuleSettings tables and retrieve them from the Settings hashtable available in both your module controls which will inherit from DotNetNuke.Entities.Modules.PortalModuleBase or in the Settings.ascx control which will inherit from DotNetNuke.Entities.Modules.ModuleSettingsBase. Settings stored in the ModuleSettings table will be be the same for all modules having the same ModuleId - including those placed on a page as a clone copy with Add Existing Module or those having the Show on All Pages box checked in their configuration. TabModuleSettings are unique to the module instance on a page - even if the module is a clone.

Michael Washington has a very brief tutorial on Settings and Personalization as well as several example modules at the following site: http://www.adefwebserver.com/DotNetNukeHELP/. A look at the source code of nearly any module will give many more examples of storing and retrieving module settings.

Unless the module requires a very few number of settings, I generally create a configuration class which is responsible for loading/updating the stored settings and exposing them to the individual module controls as strongly typed properties. If the settings are very numerous or if some settings would require storage in long nvarchar fields in the database I prefer to create my own custom table with columns of the appropriate data type for storing the settings and again create a configuration class for loading/updating them.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Creating a module: where to place configuration infoCreating a module: where to place configuration info


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