Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netcore: Added TreeAlias to TreeNodesRenderingNotification #10024

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Umbraco.Web.BackOffice/Trees/TreeControllerBase.cs
Expand Up @@ -12,7 +12,6 @@
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
{
Expand Down Expand Up @@ -150,7 +149,7 @@ public async Task<ActionResult<TreeNodeCollection>> GetNodes(string id, [ModelBi
node.RoutePath = "#";

//raise the event
await _eventAggregator.PublishAsync(new TreeNodesRenderingNotification(nodes, queryStrings));
await _eventAggregator.PublishAsync(new TreeNodesRenderingNotification(nodes, queryStrings, TreeAlias));

return nodes;
}
Expand Down
Expand Up @@ -22,10 +22,16 @@ public class TreeNodesRenderingNotification : INotification
/// </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;
}
}
}