Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Aug 26, 2016 @ 08:45
    Michaël Vanbrabandt
    0

    Publish package with custom Package actions

    Hi,

    I have made a custom package which I would like to publish with a custom package action.

    For my custom package action I have created a new class that inherits from IPackageAction.

    public class PackageActions : IPackageAction
    {
        // stuff...
    }
    

    This is located in my package dll that I include in the package.

    Will this run automatically if you install the package or do I need to add something in the actions tab of my package?

    /Michaël

  • Comment author was deleted

    Aug 26, 2016 @ 08:48

    Yeah you need to add a snippet of xml to the package action bit of your package, otherwise it will not run (here are some samples https://our.umbraco.org/wiki/how-tos/packages-and-projects/package-action-samples )

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Aug 26, 2016 @ 09:43
    Michaël Vanbrabandt
    100

    Hi Tim,

    I have added the following action into my package.xml:

    <Action runat="install" undo="true" alias="uContentMap"></Action>
    

    It should add a new section direclty after the dashBoard element in Dashboard.config.

    How can I debug this to see what is wrong?

    /Michaël

  • Zac 223 posts 575 karma points
    Jan 18, 2017 @ 12:58
    Zac
    0

    Hi Tim,

    Unfortunately this page is 404ing. I can't seem to find the how-tos for package actions, any idea where they might have run off to?

  • Comment author was deleted

    Aug 26, 2016 @ 09:45

    You can use the package action tester from Richard https://our.umbraco.org/projects/developer-tools/package-action-tester/

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Aug 26, 2016 @ 10:04
    Michaël Vanbrabandt
    0

    Hi Tim,

    didn't know about this plugin! Thanks for the intel!

    Now it works like a charm!

    /Michaël

Please Sign in or register to post replies

Write your reply to:

Draft