removing duplicated extension methods that could encourage bad practice when used in the wrong way.

This commit is contained in:
Claus
2020-09-08 10:36:35 +02:00
parent 46b4b22dcd
commit 11e42c0a56

View File

@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Web.Mvc;
using System.Web.Mvc.Html;
using Umbraco.Core.Models.Blocks;
@@ -35,11 +34,5 @@ namespace Umbraco.Web
return GetBlockListHtml(html, prop?.GetValue() as BlockListModel, template);
}
public static IHtmlString GetBlockListHtml(this IPublishedProperty property, HtmlHelper html, string template = DefaultTemplate) => GetBlockListHtml(html, property?.GetValue() as BlockListModel, template);
public static IHtmlString GetBlockListHtml(this IPublishedContent contentItem, HtmlHelper html, string propertyAlias) => GetBlockListHtml(html, contentItem, propertyAlias, DefaultTemplate);
public static IHtmlString GetBlockListHtml(this IPublishedContent contentItem, HtmlHelper html, string propertyAlias, string template) => GetBlockListHtml(html, contentItem, propertyAlias, template);
}
}