Add option for Listview to change the tab name
This commit is contained in:
@@ -170,7 +170,12 @@ namespace Umbraco.Web.Models.Mapping
|
||||
|
||||
var listViewConfig = editor.PreValueEditor.ConvertDbToEditor(editor.DefaultPreValues, preVals);
|
||||
//add the entity type to the config
|
||||
listViewConfig["entityType"] = entityType;
|
||||
listViewConfig["entityType"] = entityType;
|
||||
|
||||
//Override Tab Label if tabName is provided
|
||||
if (listViewConfig.ContainsKey("tabName") && !String.IsNullOrWhiteSpace(listViewConfig["tabName"].ToString())) {
|
||||
listViewTab.Label = listViewConfig["tabName"].ToString();
|
||||
}
|
||||
|
||||
var listViewProperties = new List<ContentPropertyDisplay>();
|
||||
listViewProperties.Add(new ContentPropertyDisplay
|
||||
|
||||
@@ -50,7 +50,10 @@ namespace Umbraco.Web.PropertyEditors
|
||||
}
|
||||
|
||||
internal class ListViewPreValueEditor : PreValueEditor
|
||||
{
|
||||
{
|
||||
[PreValueField("tabName", "Tab Name", "textstring", Description = "The name of the tab that the list of child items will be displayed")]
|
||||
public int TabName { get; set; }
|
||||
|
||||
[PreValueField("displayAtTabNumber", "Display At Tab Number", "number", Description = "Which tab position that the list of child items will be displayed")]
|
||||
public int DisplayAtTabNumber { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user