Added TreeAlias to TreeNodesRenderingNotification (#10024)

This commit is contained in:
Bjarke Berg
2021-03-22 08:59:17 +01:00
committed by GitHub
parent d55a484c56
commit f8d50694dd
2 changed files with 8 additions and 3 deletions

View File

@@ -12,7 +12,6 @@ using Umbraco.Cms.Web.BackOffice.Controllers;
using Umbraco.Cms.Web.Common.Filters;
using Umbraco.Cms.Web.Common.ModelBinders;
using Umbraco.Extensions;
using Constants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Cms.Web.BackOffice.Trees
{
@@ -150,7 +149,7 @@ namespace Umbraco.Cms.Web.BackOffice.Trees
node.RoutePath = "#";
//raise the event
await _eventAggregator.PublishAsync(new TreeNodesRenderingNotification(nodes, queryStrings));
await _eventAggregator.PublishAsync(new TreeNodesRenderingNotification(nodes, queryStrings, TreeAlias));
return nodes;
}

View File

@@ -22,10 +22,16 @@ namespace Umbraco.Cms.Web.BackOffice.Trees
/// </summary>
public FormCollection QueryString { get; }
public TreeNodesRenderingNotification(TreeNodeCollection nodes, FormCollection queryString)
/// <summary>
/// The alias of the tree rendered
/// </summary>
public string TreeAlias { get; }
public TreeNodesRenderingNotification(TreeNodeCollection nodes, FormCollection queryString, string treeAlias)
{
Nodes = nodes;
QueryString = queryString;
TreeAlias = treeAlias;
}
}
}