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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  How tolink 2 ore more modules?
Previous Previous
 
Next Next
New Post 1/24/2008 9:07 AM
Resolved
User is offline Gnaskky
22 posts
10th Ranked


How tolink 2 ore more modules? 

Hi to all,

 

I've to implement a custom module in order to search, index and manage a collection of companies,

 

since moast funcitions are always the same i'd like to make a module with some (view) controls... I've started a new fresh dnn module with this manifest:

 

 <modules>
        <module>
          <friendlyname>Companies.Matrix</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>              
              <title>Dashboard</title>
              <src>DesktopModules/Companies/View.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
        <module>
          <friendlyname>Companies.Search</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <title>Search</title>
              <src>DesktopModules/Companies/Search.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
        <module>
          <friendlyname>Results</friendlyname>
          <cachetime>0</cachetime>
          <controls>
            <control>
              <title>Results</title>
              <src>DesktopModules/Companies/Results.ascx</src>
              <type>View</type>
              <helpurl></helpurl>
            </control>
          </controls>
        </module>
      </modules>

 

than...

 

the first sub-module displays a clustered view  of companies,

the second is a search modul with its form,

and the third sub module will show the result of both the above described sub modules.

 

so i will like to to perform searches by the use of the 1st and 2nd module, than I'd like to use the third module to display and than manage results.

 

Then, how to link the 3rd module to the 1st and to the 2nd?

NOTE: each module must be show alone (ie. without the others)

 

thanks in advice.

 

 

 

 
New Post 1/25/2008 2:28 AM
User is offline Agung Riyadi
100 posts
9th Ranked


Re: How tolink 2 ore more modules? 

I think you have to look at Blog module source code.

It will helps you in your scenario.

HTH.

 
New Post 1/25/2008 11:26 AM
Accepted Answer 
User is offline Chris Taylor
87 posts
yakshaving.blogspot.com
10th Ranked




Re: How tolink 2 ore more modules? 

I've seen this done in a number of ways

1) DNN has a component called InterModule Communication (IMC) which works like Sharepoint in which two distinct modules on a page can share an interface contract and communicate data back and forth.  I haven't seen *much* on this in the past few years, I do'nt know how many people actually used it. 

2) Event Messaging - DNN offers an event messaging system.  You could use that depending what you  need to do to communicate. I've never used the eventing system so I don't know if this is quite the right mix for it. 

3) The most common thing I've seen is using the ctl parameter in the query string to define which control you want to show up (you have to register these controls in the module definitions) in which case you can just pass the mid (module id) and the ctl (which you define the name in definitions) and it will load that screen.  The catch to this method is that it will *only* show the one control, so if other modules are on the page, they will not be visible when you lcick something to show this one ctl.

4) Bubbling events - I'm not a *big* fan of this, but I know it can certainly be an easy approach.  You could look at the Page object of the ModuleBase (which you inherit into your control).  Use Page.FindControl, or recursivly go through the page controls (your approach is up to you) and find an instance of the control you want.  Then cast and link up to some events so on postback it can respond in some way.  This can have a number of drawbacks too (multiple instances on a page, prefecting when you hook your events in, etc).  that will allow you to have separate modules that can communicate in a more "round-a-bout" fashion (whereas IMC is a bit more elegant as well as the DNN event sink). 

HTH,

Chris


------------- w00t!
 
New Post 1/25/2008 8:23 PM
User is offline Snoek8
52 posts
www.mexmax-internet.com
10th Ranked


Re: How tolink 2 ore more modules? 

What you could also do is create three seperate modules and communicate using querystrings. You would have to do a postback but this is an easy way of communicating between modules.

 
New Post 1/27/2008 2:33 AM
User is offline Gnaskky
22 posts
10th Ranked


Re: How tolink 2 ore more modules? 

I've done... just by nesting controls:

i've made a 2 "control container"s and some others nested controls dynamically loaded by the internal state of the module... then i've used the Attribute() method to build a communication mechanism between controls, so the control container works as a management component that delegates at each nested control a specific task and makes all nested sub components work together.

Well, it not a perfect projecting pattern, but it works in a simple way :) so i've used it...

 

Thanks

/D

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  How tolink 2 ore more modules?
 


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.

 


ASP.NET Web Hosting for $3.95
3 Month FREE ASP.NET Hosting! FREE Setup! DNN Support! FREE Domain Name! FREE Components! Host multiple websites on 1 plan! 30 Days Money Back Guarantee!
www.dailyrazor.com
Cestus Websites
DotNetNuke websites en services in Nederland. Cestus Websites levert websites, projectmanagent, skins, modules, training en gespecialiseerde hosting op basis van het CMS DotNetNuke.
www.dotnetnuke-websites.nl
FREE Skins, Modules & Control Panel!
Choose how much you want to pay on our Skins, Modules, Containers and Control Panel - Starting from FREE!
www.dnngroup.com

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