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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Module id not constant?Module id not constant?
Previous
 
Next
New Post
4/23/2015 11:28 AM
 

Hi all, 

As a complete newbie, I am developing my first custom module. First thing I am trying to do is figure out how to use custom settings using the Christoc.com module template.

In this simple set up I have one Module setting and a TabModule setting.
When I drop two instances of this module on a test page I notice that the ModuleId for both instances are different. This is not what I expected.
Shouldn't the ModuleId be the same for both instances?

This is my code:

public override void UpdateSettings()
        {
            try
            {
                var modules = new ModuleController();
                modules.UpdateModuleSetting(ModuleId, "APIServer", txtSettingAPIServer.Text);
                modules.UpdateTabModuleSetting(TabModuleId, "Model", txtSettingModel.Text);

            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }

 
New Post
4/23/2015 12:17 PM
 
The ModuleID won't be the same, the ModuleDefinitionID will be. Module ID is that record of the module when placed on the page. If you add that module (through the control panel) to the same page, or a new page, it will get a new ModuleID.

If however you "copy" that module to another page (copy from the first page) the ModuleID will stay the same, the TabModuleID will be different.

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
4/23/2015 12:48 PM
 
Chris Hammond wrote:
If however you "copy" that module to another page (copy from the first page) the ModuleID will stay the same, the TabModuleID will be different.

 this means, if you "reference" an existing module from a different page, it will be same moduleID.

if you "copy" module and content, it will get a new ModuleID


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/24/2015 6:13 AM
 

Thank you all for the info.
I am trying to incorporate that in my first code.
Is there any documentation/manual available for the domain-model, api etc?

Jacques

 
New Post
4/24/2015 9:57 AM
 
Jacques van 't Ende wrote:

Thank you all for the info.
I am trying to incorporate that in my first code.
Is there any documentation/manual available for the domain-model, api etc?

Jacques

 

Not any that provides any usefulness unfortunately

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Module id not constant?Module id not constant?


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