Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
r2i.ntegrated
 


  Sponsors  

Meet Our Sponsors

Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  storing portal host wide settings as a module developer?
Previous Previous
 
Next Next
New Post 5/29/2008 9:37 AM
User is offline rudgr
236 posts
9th Ranked




storing portal host wide settings as a module developer? 

As a module developer I can store ModuleSettings and TabModuleSettings. But suppose for some reason I need to store a certain setting for a Module that should be available to all other Modules in the Portal or Host...  Can I just add host/portal settings as module developer?

 
New Post 5/29/2008 10:41 AM
User is offline Brian Dukes
476 posts
www.engagesoftware.com
8th Ranked


Re: storing portal host wide settings as a module developer? 

There are two ways to get this done.  First, you can use DotNetNuke.Entities.Portals.PortalSettings.UpdateSiteSetting and DotNetNuke.Entities.Portals.PortalSettings.GetSiteSetting to set settings.  This is actually just a shortcut to the module settings of the portal's Site Settings control.  Because of this, you need to very careful and explicit in your naming to make sure that you don't accidentally overwrite a core setting or another module's settings.

You can also use DotNetNuke.Entities.Host.HostSettings.GetHostSetting and DotNetNuke.Entities.Host.HostSettingsController().UpdateHostSetting to write your own settings at the host level, making sure to include the PortalID in the setting when you do that.  This has less chance of overwriting a core setting, but is otherwise basically the same deal as above.

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 5/29/2008 10:51 PM
User is offline Wes Tatters
410 posts
8th Ranked




Re: storing portal host wide settings as a module developer? 

One thing that you do need to be careful of when using PortalSettings or HostSetting is that doing so  can break the ability to TEMPLATE snapshot a site 
taking advantage of module Import/Export.

The reason for this is that when you generate a site form a template the PortalSettings Module is not  always created before your own module.
As a result calls to updatesitesettings etc in your module import implementation fail at import during the template installation.

Westa

 
New Post 6/2/2008 12:45 AM
User is offline rudgr
236 posts
9th Ranked




Re: storing portal host wide settings as a module developer? 

Thanks!

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  storing portal host wide settings as a module developer?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Need Help with your DotNetNuke website?
Jango Studios offers exclusive DotNetNuke Skin Design, Module Development, Web Marketing and Web Hosting.
www.jangostudios.net
Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP