From d9d54f79822f0c902ae7016c0460a325a964459f Mon Sep 17 00:00:00 2001 From: Stephan Date: Wed, 20 Feb 2019 12:56:14 +0100 Subject: [PATCH] Merge branch 'temp8-fixes-published-content-children-method' into dev-v8 (cherry picked from commit 735d7592089838d546717f1191536412109dc895) --- src/Umbraco.Web/PublishedContentExtensions.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web/PublishedContentExtensions.cs b/src/Umbraco.Web/PublishedContentExtensions.cs index c77594eabe..f880076c50 100644 --- a/src/Umbraco.Web/PublishedContentExtensions.cs +++ b/src/Umbraco.Web/PublishedContentExtensions.cs @@ -979,11 +979,11 @@ namespace Umbraco.Web /// /// The content. /// The specific culture to filter for. If null is used the current culture is used. (Default is null) - /// One or more content type alias. + /// The content type alias. /// The children of the content, of any of the specified types. - public static IEnumerable Children(this IPublishedContent content, string culture = null, params string[] alias) + public static IEnumerable ChildrenOfType(this IPublishedContent content, string contentTypeAlias, string culture = null) { - return content.Children(x => alias.InvariantContains(x.ContentType.Alias), culture); + return content.Children(x => contentTypeAlias.InvariantContains(x.ContentType.Alias), culture); } /// @@ -1010,9 +1010,9 @@ namespace Umbraco.Web /// /// Gets the first child of the content, of a given content type. /// - public static IPublishedContent FirstChildOfType(this IPublishedContent content, string alias, string culture = null) + public static IPublishedContent FirstChildOfType(this IPublishedContent content, string contentTypeAlias, string culture = null) { - return content.Children(culture,alias).FirstOrDefault(); + return content.ChildrenOfType(contentTypeAlias, culture).FirstOrDefault(); } public static IPublishedContent FirstChild(this IPublishedContent content, Func predicate, string culture = null)