Add ability for editors to search for media items by file name as well as node name.

This commit is contained in:
Jeavon
2019-10-03 17:46:18 +01:00
parent 09df60455c
commit e4df2f4205
4 changed files with 51 additions and 4 deletions

View File

@@ -180,6 +180,15 @@ namespace Umbraco.Web.Models.Mapping
target.Name = source.Values.ContainsKey("nodeName") ? source.Values["nodeName"] : "[no name]";
if (source.Values.ContainsKey("__umbracoFile"))
{
var umbracoFile = source.Values["__umbracoFile"];
if (umbracoFile != null)
{
target.Name = $"{target.Name} ({umbracoFile})";
}
}
if (source.Values.ContainsKey(UmbracoExamineIndex.NodeKeyFieldName))
{
if (Guid.TryParse(source.Values[UmbracoExamineIndex.NodeKeyFieldName], out var key))