private void ContentTreeController_MenuRendering(Umbraco.Web.Trees.TreeControllerBase sender, Umbraco.Web.Trees.MenuRenderingEventArgs e) { switch (sender.TreeAlias) { case "content": //creates a menu action that will open /umbraco/currentSection/itemAlias.html; var i = new Umbraco.Web.Models.Trees.MenuItem("itemAlias", "Item name");
//optional, if you dont want to follow conventions, but do want to use a angular view i.AdditionalData.Add("actionView", "path to your angularJS view");
//sets the icon to icon-wine-glass i.Icon = "message";
//insert at index 5 e.Menu.Items.Insert(5, i);
break; } }
Customizing Node Right Click Properties
Hi,
is there a way to add custom controls into the right click menu of a node?
i.e. as attached screen shot.
cheers,
Hi zell,
yes, you can do this with tree events and a custom property editor written with angularJS:
Tree Events:
https://our.umbraco.org/documentation/extending-umbraco/section-trees/trees-v7
AngularJS:
https://our.umbraco.org/Documentation/Extending-Umbraco/Property-Editors/creating-tutorial1-v7
Example for register tree events:
Hope this helps?
Best,
Sören
is working on a reply...