Cleaned up config for Content settings

This commit is contained in:
Bjarke Berg
2020-03-12 15:30:22 +01:00
parent cb0994a929
commit c486444eda
73 changed files with 279 additions and 351 deletions

View File

@@ -60,12 +60,12 @@ namespace Umbraco.Web
/// <remarks>
/// See: http://issues.umbraco.org/issue/U4-1614
/// </remarks>
public static MvcHtmlString PreviewBadge(this HtmlHelper helper, IHttpContextAccessor httpContextAccessor, IGlobalSettings globalSettings, IIOHelper ioHelper, IUmbracoSettingsSection umbracoSettingsSection)
public static MvcHtmlString PreviewBadge(this HtmlHelper helper, IHttpContextAccessor httpContextAccessor, IGlobalSettings globalSettings, IIOHelper ioHelper, IContentSettings contentSettings)
{
if (Current.UmbracoContext.InPreviewMode)
{
var htmlBadge =
String.Format(umbracoSettingsSection.Content.PreviewBadge,
String.Format(contentSettings.PreviewBadge,
ioHelper.ResolveUrl(globalSettings.UmbracoPath),
WebUtility.UrlEncode(httpContextAccessor.GetRequiredHttpContext().Request.Path),
Current.UmbracoContext.PublishedRequest.PublishedContent.Id);