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

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Replace all copied HTML modules with a custom built moduleReplace all copied HTML modules with a custom built module
Previous
 
Next
New Post
4/25/2013 7:36 PM
 

DNN version 6.2.6

I have an HTML module on every page that displays some news headlines. It's on every page, so that's about 50 of them. Each one was copied from the first "News" module I put on the site, so if I update the content in one, it updates in all of them.

Now I built a custom module that will pull the content from the database. Is there an easy way to replace all 50 of those copied HTML modules with my new custom built "News" module?

Thanks

 
New Post
4/25/2013 9:33 PM
 

Instead of a custom module - have you considered maybe using a custom skin object ... that way you dont need the module on every page.

Just build a skin for all your pages that injects the custom skin object.

Westa

 
New Post
4/26/2013 8:28 AM
 

I would consider Wes's suggestion, but if you still want to go your route.  Look in the ModuleDefinitions table, that has a listing of all the modules installed on your system, and you will find a ModuleDefID in that table.  Then look at the Modules table, if all 50 modules are copied from 1 source, then you should find only 1 record for your module in that table.  TabModules will have 50 entries for each individual module on the pages, but you don't need to worry about that.  So replace the ModuleDefID on that 1 record in the Modules table with the ModuleDefID on your new module.  Then clear the DNN cache.   Backup before you do anything!

Thanks
Mike

 
New Post
4/26/2013 12:07 PM
 

Thanks for the suggestions. I hadn't even thought of a custom skin object, I'll definitely look into that for next time. I was also guessing there was a way to do this in the DB, but I just figured it out a way that works:

  1. In the settings for the referenced module to remove -> Advanced settings -> Check the box for "Display Module on All Pages"
  2. Click update
  3. Go back into the Advanced settings and uncheck the box for "Display Module on All Pages"
  4. Click update
  5. Now there is only one HTML module and it's on the home page (aka the other 49 are no longer there)
  6. Delete the HTML module on the home page, now they're all gone
  7. Add my custom module and in the Advanced Settings check the box for "Display Module on All Pages."

It seems kind of hacky, but it works.

Thanks again!

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Replace all copied HTML modules with a custom built moduleReplace all copied HTML modules with a custom built 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