Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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
Nice Matt.
What happens in the actionExportMedia() javascript method specified in JsFunctionName?
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
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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
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
Nice Matt.
What happens in the actionExportMedia() javascript method specified in JsFunctionName?
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
is working on a reply...