Copied to clipboard

Flag this post as spam?

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


  • Rune Grønkjær 1303 posts 2895 karma points
    Dec 20, 2010 @ 08:43
    Rune Grønkjær
    0

    How to create a custom publish action in tree

    Hi,

    I need to create an custom right click publish action on a custom tree menu. I have my XmlTreeNode and I'm trying to do the following:

    xmlTreeNod.Menu.Add( ActionPublish.Instance );

    The link is showing up in the right click menu but how do I tell it what to do when the publish link is clicked?

    I need to do something completely custum, but a kind of publish none the less.

    Hope someone can help.

    /Rune

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    Dec 20, 2010 @ 12:26
    Matt Brailsford
    0

    Hi Rune,

    You need to create a custom IAction which is what tells Umbraco what you want to do. There are many examples around in the source code of various packages, but here is an example from one of mine (Media Export)

    http://exportmedia4umb.codeplex.com/SourceControl/changeset/view/c5071f6140c0#Actions%2fExportMediaAction.cs

    It's based upon the media section, but the principle is still the same, then check the app base class for how I intergreated it into the menu

    http://exportmedia4umb.codeplex.com/SourceControl/changeset/view/c5071f6140c0#AppBase.cs

    All the best

    Matt

  • Anders Burla Johansen 2560 posts 8256 karma points
    Dec 21, 2010 @ 08:45
    Anders Burla Johansen
    0

    Nice Matt.

    What happens in the actionExportMedia() javascript method specified in JsFunctionName?

  • Matt Brailsford 2958 posts 15629 karma points MVP 7x c-trib
    Dec 21, 2010 @ 09:23
    Matt Brailsford
    1

    Hey Anders,

    That is defined in th js file included by the JsSource property:

    http://exportmedia4umb.codeplex.com/SourceControl/changeset/view/c5071f6140c0#Scripts%2fexportMedia.js

    Many thanks

    Matt

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies