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 ExtensionsModulesModulesAdding a module to a page during installationAdding a module to a page during installation
Previous
 
Next
New Post
6/16/2014 10:23 AM
 

Hi, I am building a host module and I'm struggling to get my 01.00.00.SqlDataProvider file to do what I want. As this is a host module I would like to create a new page on the host menu and add my new module to that page during the module installation process. I can create the page on the host menu by calling the 'AddTabToEnd' stored procedure. The problem starts when I then try to add the new module to the new page. As part of the installation process DNN adds an entry to the ModuleDefiinition table which generated the ModuleDefinitionID for the module, however this is not until after the 01.00.00.SqlDataProvider has ran. I need the module definition id during the 01.00.00.SqlDataProvider script so I can call the 'AddModule' and 'AddTabModule' stored procedures.

I have tried to pre-empt the new ModuleDefinitionID by getting the last ModuleDefinitionID and incrementing it by one. This idea fails due to a foreign key constraint. 

Is it possible to restructure my manifest file so DNN adds the module definition before it runs the 01.00.00.SqlDataProvider script?

Or does anybody have any ideas of how to work around this problem.

If possible I has hoping to come to a solution which didn't involve dropping and recreating any of the core DNN constraints. 

 

 
New Post
6/16/2014 11:08 AM
 
I would have a look at iUpgradable interface, it is provided to allow upgrade activities from code behind.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/17/2014 12:45 PM
 

The dnnGlimpse module on GitHub creates a host menu item and is a good working example of how to accomplish this. If you look at the FeatureController.cs you can see that I implement the IUpgradable interface as Sebastian suggests.  The AddHostPage method (which is derived from a private core platform method) then allows me to use the DNN API to create a host level menu item.


Joe Brinkman
DNN Corp.
 
New Post
6/23/2014 2:35 AM
 
Thanks Both, I have now implemented iUpgradeable as suggested and this has achieved what I wanted. Is there a similar way to fire a code behind function during a module uninstall?
 
New Post
6/23/2014 3:16 AM
 
AFAIK there is no event for module uninstall.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesAdding a module to a page during installationAdding a module to a page during installation


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