Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ian Robinson 79 posts 143 karma points
    Jun 28, 2012 @ 11:28
    Ian Robinson
    0

    How to add uninstall actions to a package

    Hi,

    I'm creating my first v4 package, which is a simple image gallery.

    It contains custom media document types and these can't be added using the package creation wizard inside Umbraco, so I'm creating them using an installer.ascx user control that runs when the package is installed.

    My question is - if the user uninstalls the package, how do I remove these custom media document types?  Can I create an uninstaller.ascx and how do I tell umbraco to run it?

  • Mel Lota 10 posts 51 karma points
    Jul 03, 2012 @ 11:22
    Mel Lota
    0

    Having had to do somthing similar recently for the uGlimpse package I created, I would imagine you'd want to take a look at using package actions:

    http://our.umbraco.org/wiki/reference/packaging/package-actions

    To use them will involve you editing the package.xml file and adding an install/uninstall actions. I'm not sure if there's an action in the standard set which handles adding/removing of document types but it's not too difficult to create a custom package action to suit your needs. You could also replace your installer.ascx with a custom package action and make it a bit more seamless.

    If you check out the source for the packageactionscontrib on Codeplex you can find some good examples of custom package actions.

    Hope this helps

    Cheers

Please Sign in or register to post replies

Write your reply to:

Draft