Skip to content

Commit

Permalink
Better title text.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Dec 5, 2023
1 parent 9879110 commit d8c4f83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lombiq.JsonEditor/Controllers/AdminController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ await _contentManager.GetAsync(contentItemId, VersionOptions.Latest) is not { }
return NotFound();
}

var title = T["Edit {0} as JSON", contentItem.ContentType].Value;
var name = string.IsNullOrWhiteSpace(contentItem.DisplayText)
? contentItem.ContentType
: $"\"{contentItem.DisplayText}\"";
var title = T["Edit {0} as JSON", name].Value;
_pageTitleBuilder.AddSegment(new StringHtmlContent(title));
var titleShape = await _shapeFactory.CreateAsync<TitlePartViewModel>("TitlePart", model =>
{
Expand Down

0 comments on commit d8c4f83

Please sign in to comment.