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...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module can't be used on other pagesCustom Module can't be used on other pages
Previous
 
Next
New Post
2/13/2013 11:47 AM
 

Hi,

I have created a custom module that stores HTML to a couple of tables that I created. The module consists of a couple of views. First view has a Table of Contents with a bunch of links that go to my second view. From the second view, I can edit the contents and save to my custom tables with the ModuleID. I have packaged this module and all of this works fine. Now I need to put this module on the French and Spanish sections of my website but when I do that, it gets assigned a new ModuleID and it doesn't retrieve the data from my database. As well, I need to put this module on 3 other portals that I'm working on and this won't work because of the new ModuleID. I can't share the modules because the English one doesn't show up on the French side and vice versa (I'm using the Community Edition 6.2.2). The whole point of creating a module for this section was so that I wouldn't have to create 100 or so pages X 3 languages X 4 portals but I can't seem to achieve this.

I guess I could use a hardcoded ModuleID from the database and pass that back and forth but this doesn't seem like a logical solution.

How can I create one module and be able to use it in multiple sections of my website and on multiple portals?

Thanks

 
New Post
2/13/2013 12:01 PM
 
It's common for a module to store data using the ModuleID as part of the data key. It's not compulsory.

If you store your data without the ModuleID as part of the key then all instances of the module will see the same data. You could achieve much the same effect by leaving the ModuleId in the key, but not using it in the SQL that searches for the data. That way you would know which module instance stored it, and other module instances could access it if they choose.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/13/2013 12:23 PM
 

Thanks for your quick reply Richard. So what would I use to retrieve the values from my database? Should I store my own arbitrary value for this particular section so that I know which records to retrieve?

Thanks

 
New Post
2/13/2013 2:34 PM
 
Your module, your tables.

Do whatever makes sense in the context of your application.

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
2/14/2013 8:27 AM
 
OK, Thanks for your help. this will work.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom Module can't be used on other pagesCustom Module can't be used on other pages


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