Ensure package view path is generated with consideration the current section (#14268)

* check section when determining package template path

* return sectionAlias as packageFolder and the route segment won't always match

* fix test

* adds PluginController attribute to StylesheetsTreeController
fixes actionUrl generation to ensure valid URL
find controller by fullname to avoid incorrect controller selection when multiple exist with same name

* Fix frontend breaking changes

* Adding missing PluginController attribute for ScriptsTreeController

---------

Co-authored-by: Elitsa <elm@umbraco.dk>
This commit is contained in:
Nathan Woulfe
2023-07-03 22:17:24 +10:00
committed by GitHub
parent fad710364c
commit 5382820e58
10 changed files with 72 additions and 39 deletions

View File

@@ -704,6 +704,9 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
[DataMember(Name = "packageFolder")]
public string? PackageFolder { get; set; }
[DataMember(Name = "sectionAlias")]
public string? SectionAlias { get; set; }
}
private IEnumerable<PluginTree> GetPluginTrees()
@@ -735,7 +738,7 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
continue;
}
yield return new PluginTree { Alias = tree.TreeAlias, PackageFolder = pluginController.AreaName };
yield return new PluginTree { Alias = tree.TreeAlias, PackageFolder = pluginController.AreaName, SectionAlias = tree.SectionAlias };
}
}