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.0Accessing Settings from ModuleController classAccessing Settings from ModuleController class
Previous
 
Next
New Post
2/20/2006 5:25 AM
 
Hi,

Using : DNN 4.x, VS2005, and C#.

I am creating a new control in which I would like to be able to export the Settings (not the data content). The module settings are quite complex and I would like to be able to port them into other modules of the same type on different pages.

I can create the necessary XML etc. BUT my ModuleController class does not have access to the current modules settings - despite the ModuleID being passed in via the Export call.

Can anyone please advise what I must do to access the current modules settings when Export is fired ??. How can I use the supplied ModuleID to allow me to see the specific tabmodule settings ??.

Many Thanks

Regards

Graham

 
New Post
3/4/2006 7:00 PM
 
You should be able to retrieve the modulesettings manually by using
DotNetNuke.Entities.Modules.ModuleController().GetModuleSettings
Never tried it myself, but I believe that TabModuleSettings is a problem, because at this point you don't know on which tab the user is. Having said that, it is probably possible to keep track of the tabid of the last active instance of your module, by putting that into Sessionstate. That way you could read that Session variable from within the ExportModule function.

Hope this helps.

Web applications, DNN websites, modules, skins and support
 
New Post
3/6/2006 3:04 AM
 
Stefan,

Thanks for the reply - I was beginning to think that no-one was going to at least try ).

Its TabModuleSettings I really need, and the moduleID is passed in to the Export call, so I would have expected to be able to use GetTabModuleSettings() to retrieve this (.

In Export() I am trying to save ALL the module content - settings as well as content.

Thanks though...

If there is a problem with GetTabModuleSettings() - maybe someone in the team could respond and suggest when a fix may become available ??.

Thanks

Regards

Graham
 
New Post
3/6/2006 10:24 AM
 
I didn't mean there's a problem with GetTabModuleSettings, works like crazy
However, you will need to write some code to find out on which Tab the user was, prior to choosing the Export function.
If you've managed to do so, you should be able to get the TabModuleSettings also.

Web applications, DNN websites, modules, skins and support
 
New Post
3/7/2006 10:40 AM
 
Stefan,

Thanks again for your input. I decided that I really needd to better understand ModuleID and TabModuleID . Finally got there I think ).

I suspect that it is an oversight not to have the TabModuleID available in Export/Import, as it would often be VERY useful to export a module with all of its settings ;-O (could be optional).

Anyway - resolved my problem by storing my data in ModuleSettings instead of TabModuleSettings !! - well the settings actually define the content which will be displayed as opposed to the look & feel - so it seemed right. Now I can access via ModuleID which is passed in.

Many thanks for your help though - certainly pointed me in the right direction ).

regards

Graham
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Accessing Settings from ModuleController classAccessing Settings from ModuleController class


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