I have a list of pages in Content. When user right click on one page, I add one more MenuItem on the top that will process by angular. The problem is if I selected page1 (id: 1122) and then I right-click on page4 (id: 1125). In my angular controller I still get $routeParams.id = 1122. It should be updated to 1125.
But If I make a left-click on page4 and then right-click. It will solve the problem. It looks like left-click to focus on that page to make Umbraco update client URL. So how can I set selected Item on page4 when I do a right-click. Or somehow I can get exactly id that selected by right-click in angular controller. Thanks
private void TreeControllerBase_MenuRendering(TreeControllerBase sender, MenuRenderingEventArgs e) { var cs = new ContentService(); int id; Int32.TryParse(e.NodeId, out id); if (id > 0 && cs.GetById(id).ContentType.Alias == "Partner") { var i = new MenuItem("createScaffold", "Create From Template"); i.AdditionalData.Add("actionView", "../App_Plugins/CustomTemplateMenuTree/create.html"); i.Icon = "home"; e.Menu.Items.Insert(0, i); } }
Tree menu rendering problem
I have a list of pages in Content. When user right click on one page, I add one more MenuItem on the top that will process by angular. The problem is if I selected page1 (id: 1122) and then I right-click on page4 (id: 1125). In my angular controller I still get $routeParams.id = 1122. It should be updated to 1125.
But If I make a left-click on page4 and then right-click. It will solve the problem. It looks like left-click to focus on that page to make Umbraco update client URL. So how can I set selected Item on page4 when I do a right-click. Or somehow I can get exactly id that selected by right-click in angular controller. Thanks
is working on a reply...