Products

Solutions

Resources

Partners

Community

Blog

About

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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Connecting Modules to use the same table.Connecting Modules to use the same table.
Previous
 
Next
New Post
3/31/2018 1:51 PM
 
I am building a module that is a calendar. It has some custom fields in the table and will be the only module on the page. For example, let's name this module "Calendar"

On another page I want to display the next upcoming 4 events from this "Calendar" module.

How can I pull data from another module on another page using the MVC Templates from Chris Hammond? (https://github.com/ChrisHammond/DNNTemplates)

Page 1:
Calendar Display - Shows next 4 events

Page 2:
Calendar - Shows all events.
 
New Post
3/31/2018 4:41 PM
 
I'd say don't.

Have both read from the same data in the DB. If you only want to support one calendar module in the entire site then it's trivial.

If you want to support multiple calendars; then the way I have seen is for the subordinate module to look in the database for instances of the senior module. In the subordinate module's configuration the user has to decide which one it shares data with.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
4/1/2018 1:33 AM
 
I like the idea of supporting multiple instance of the module and using parent - child modules (subordinate as you say). How can I have a setting that looks for other modules?
 
New Post
4/1/2018 10:41 PM
 
Well your settings code can do anything you like. So I would be looking in the module/tabmodule tables (I forget the exact names.)

I've seen this in the Ventrian modules specifically Ventrian News. Scott open sourced them recently. Take a look for inspiration. https://github.com/ventrian

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Connecting Modules to use the same table.Connecting Modules to use the same table.


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