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
I have a custom section in Umbraco 8.5.4. This section utilizes a Nagivation tree which is broken down into a few pieces. Here's a quick example...
I have an action on each of the individual inactive events called "Activate". The idea is when you click that from the context menu, it will perform some actions (either in C# or via a webapi (in turn performing some C# logic) which will update the event details to "activate it" and then refresh the menu to show that the item has moved out of that node structure into the right place.
Quick code example:
protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
// create a Menu Item Collection to return so people can interact with the nodes in your tree
var menu = new MenuItemCollection();
if (id == Constants.System.Root.ToInvariantString())
// add a delete action to each individual item
//menu.Items.Add<ActionDelete>(Services.TextService, true, opensDialog: true);
menu.Items.Add(new MenuItem("Activate", "Activate"));
My issue is that I can't figure out how to execute an action. I know when I click "Activate" now, it loads up a Activate.html view. In a perfect world, I would either want to show a dialog to confirm activation or just have it activate it (the user could then de-activate it from the Active list if it was an accident).
Can someone help guide me to some examples or documentation showing how this might be done? I could throw away doing this in the umbraco Tree structure and simply have a table view/admin page, but I'm really trying to make it "feel" as umbraco-ey as possible.
Thanks in advance!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted