Anyone know what the equivalent of the TreeControllerBase.TreeNodesRendering event is in Umbraco 10? Is it even still available or has it been removed?
How can I tap into the tree node rendering events?
You need to create and register a menurendering notification
public class MemberTreeNotificationHandler : INotificationHandler<MenuRenderingNotification>
{
/// <summary>
/// Adds a translate action to the Dictionary menu
/// </summary>
/// <param name="notification">The notification details</param>
public void Handle(MenuRenderingNotification notification)
{
if (notification.TreeAlias.Equals(Constants.Trees.Members))
{
var menuItem = new Umbraco.Cms.Core.Models.Trees.MenuItem("sendValidation", "SendValidation");
menuItem.AdditionalData.Add("actionView", "/App_Plugins/MediaWizards/resendValidation.html");
menuItem.Icon = "shuffle";
notification.Menu.Items.Add(menuItem);
}
}
}
Then register using a composer
public class MediaWizComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
builder.AddNotificationHandler<MenuRenderingNotification, MemberTreeNotificationHandler>();
}
}
What happened to TreeNodesRendering in v10?
Anyone know what the equivalent of the TreeControllerBase.TreeNodesRendering event is in Umbraco 10? Is it even still available or has it been removed?
How can I tap into the tree node rendering events?
Thanks
Hi,
You need to create and register a menurendering notification
Then register using a composer
is working on a reply...