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.0Is it possible to embed a DNN module into a different DNN module?Is it possible to embed a DNN module into a different DNN module?
Previous
 
Next
New Post
7/8/2008 4:51 AM
 

Dear All,

I was wondering if anyone knows if it is possible to embed a DNN module into a different DNN module or maybe already has such a solution running.

For example, I would like to use the Events module as a provider for a different module, using it as a very advanced web control / provider for a different module.

Hope to hear from someone on the subject...

Greetings,

 

 


Regards,

Jerry Tjon
IT Consultant
Amsterdam,
the Netherlands
 
New Post
7/8/2008 5:09 AM
 

I remember there have been aggregator modules, i.e. this is possible, but I cannot tell you about performance issues and other limitations.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/8/2008 5:32 AM
 

It would be possible to add code to an events module to allow it the ability to dynamically load another module.

The functionality is not there at the moment - but it something that could theoretically be done ...

Westa

 
New Post
7/15/2008 6:01 AM
 

Yes you could.

First, you have to know which module you want to retrieve it's content. This is usually by querying a tab to get module list. Then based on your module list, you can choose which module you want to retrieve it's content. I will show you an example, notes that this is only proof of concept that i've been doing for my client. Feel free to modify.

Suppose that you have Home page. Then in that page you have one module (let say Events module with it's contents).

Open your Visual Studio, and create your custom module. Feel free to name it. Add one web user control with simple name like View.ascx or something. Go to View.ascx.cs (your code behind) then add this code in your Page_Load method.

TabController tc = new TabController();
// Home is your other tab on which you want to load tab's modules
// in reality, you can make it as dropdownlist to show all user's tab and make a choice
TabInfo ti = tc.GetTabByName("Home", PortalSettings.PortalId);   

// Show tab's module from Home page
ModuleController mc = new ModuleController();
Dictionary<int, ModuleInfo> listModules = mc.GetTabModules(ti.TabID);

string ctrl = "";

foreach (KeyValuePair<int, ModuleInfo> item in listModules) {
    ModuleInfo mi = item.Value;
    ModuleInfo eventModule = mc.GetModule(mi.ModuleID, ti.TabID);
   
    // Notes that this is because you have only one module
    // in reality, you can make it as dropdownlist
    // so user can choose which module they want to load
    ctrl = mi.ControlSrc;
}

PortalModuleBase objPMB = (PortalModuleBase)this.LoadControl("~/" + ctrl);
objPMB.ModuleConfiguration = this.ModuleConfiguration;
objPMB.ID = System.IO.Path.GetFileNameWithoutExtension(ctrl);

// Create placeholder control dynamically to inject portalmodulebase
PlaceHolder ph = new PlaceHolder();
ph.Controls.Add(objPMB);

this.Controls.Add(ph);

Build your custom module. And install it into your DNN website. Let's go to the next step.

You create another page with name Page2 and drop your custom module onto it. Then you will see that your custom module will render as Event module from Home page or we can say that you have been embedding your Events module inside another module. :)

HTH.

 
New Post
7/15/2008 11:22 AM
 

Hi All, Agung,

Thanks for the in depth reply.

What I have is a custom module which I use for Document Management, DMX version3.

I would like to adjust the Events module in such a way that I am able to select documents press a button and export those to the events module as an event item.

The Event module can then be used by users to check which documents need to be checked by a document management  team member, the team can plan ahead, generate work list per week, set Reminders etc.

So the next question I have is, is it possible to pass data and variables between modules, I guess you need to be able to pass variables between modules.

Again thanks for the reply!

Cheers,


Regards,

Jerry Tjon
IT Consultant
Amsterdam,
the Netherlands
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Is it possible to embed a DNN module into a different DNN module?Is it possible to embed a DNN module into a different DNN module?


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