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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Get ModuleID from module nameGet ModuleID from module name
Previous
 
Next
New Post
8/27/2008 2:55 PM
 

How can I get the module ID of a different module using the module name? Is that possible?

Thank you.

Ben

 
New Post
8/27/2008 4:34 PM
 

The short answer is "yes", you can do this.  The long answer is a little more complicated and depends on a couple factors.  First, what "name" are you referring to?  The title of a module instance?  The name of the module definition?  Combination of the two?

I have a scenario internally where I need to find all the references of a particular module type and then link a single instance to a module of another type.  I use the following code to pull that off (pretty basic sample here, mind you):

 

DotNetNuke.Entities.Modules.ModuleController mc = new ModuleController();
ArrayList existMods = mc.GetModulesByDefinition(this.PortalId, "ModuleFriendlyName");

foreach (DotNetNuke.Entities.Modules.ModuleInfo mi in existMods)
{
if (!mi.IsDeleted)
{
// get module title
//mi.ModuleTitle;
// additionally, you can find out what tab it is on //mi.TabID;
//mi.ModuleID;
}
}

 


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
New Post
8/29/2008 10:21 PM
 

Thank you for your reply. Sorry, for the delay in getting back here.

I am not sure how to answer your questions, so maybe it would be better if I told you what I was trying to do. I have a module that users can add clients to a database. Each record includes the module ID so that each instance of the module retains a separate list. In a different module I want to query the list of clients for a specific module so that I can allow users to make a selection of client from that specific module.

I think the code you provided may work, though.

Thank you for your help. I do have one last question. Is there a place I can find more information about the DotNetNuke framework? I have found material about how to make modules and skins, but not to much about the framework itself, and how it works.

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Get ModuleID from module nameGet ModuleID from module name


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