Makes it possible to change the icon for list view content apps

This commit is contained in:
Søren Kottal
2019-10-01 21:11:56 +02:00
committed by Sebastiaan Janssen
parent b8e5146baa
commit 8f300761ef
4 changed files with 54 additions and 0 deletions

View File

@@ -100,6 +100,15 @@ namespace Umbraco.Web.ContentApps
if (configTabName != null && String.IsNullOrWhiteSpace(configTabName.ToString()) == false)
contentApp.Name = configTabName.ToString();
}
//Override Icon if icon is provided
if (listViewConfig.ContainsKey("icon"))
{
var configIcon = listViewConfig["icon"];
if (configIcon != null && String.IsNullOrWhiteSpace(configIcon.ToString()) == false)
contentApp.Icon = configIcon.ToString();
}
// if the list view is configured to show umbContent first, update the list view content app weight accordingly
if(listViewConfig.ContainsKey("showContentFirst") &&
listViewConfig["showContentFirst"]?.ToString().TryConvertTo<bool>().Result == true)