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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Module Upgrade - How to Handle Included Template Files?Custom Module Upgrade - How to Handle Included Template Files?
Previous
 
Next
New Post
11/13/2007 5:14 PM
 

I'm packaging an upgrade to a rather complex module I wrote 6 months ago. The original 04.00.00 version included an xml file (placed in the module's App_LocalResources folder) containing some 30 e-mail templates. I don't want to include this xml file (which hasn't changed) in the module 04.01.00 upgrade package out of concern that it will overwrite the templates which a user may have customized since the original install. If I don't include it in the upgrade package then anyone doing a new install rather than an upgrade from the 04.01.00 package will not have this essential file available.

How have other's handled inclusion of such files in an upgrade package? I can see three alternatives: 1)  Include the template file but advise users that are upgrading to temporarily rename their modified template file then copy it back over the new, unmodified file; 2) Include the template file with a different name then implement using the IUpgradable interface an automatic rename of the new template file to its correct name if one does not exist from a previous install; or 3) Not include the template file in the module upgrade package but make it available as a separate file for new installations only. I'm leaning to #2, but would like to have some other opinions.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
11/14/2007 1:38 AM
 

Bill,

I suggest to include template files in a dedicated location and copy it over to the final folder, if not present, during installation or first call of the module.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/14/2007 10:17 AM
 

Thanks Sebastian - That's what I decided to do, implementing it as part of the IUpgradable.UpgradeModule method. It seems to work well, though I had a tough time getting the absolute path to the files. It seems that use of HttpContext.Current.Server.MapPath when used in the UpgradeModule kept adding in virtual folders from a previously accessed tab, resulting in something like:

C:\DNN4Test\Admin\LogViewer\tabid\48\DesktopModules\ . . . rather than C:\DNN4Test\DesktopModules\ . . .

I suspect that the current context is not valid while UpgradeModule is running. I finally used the following to build my absolute path:

DestFilepath = DotNetNuke.Common.Globals.ApplicationMapPath & "\DesktopModules\" & _
                 dmi.FolderName & "\" & Localization.LocalResourceDirectory & "\Templates\EMail.xml"

where dmi is my DesktopModuleInfo object. Hope this helps someone trying to do a similar operation in their UpgradeModule method


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Module Upgrade - How to Handle Included Template Files?Custom Module Upgrade - How to Handle Included Template Files?


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