From ba3e63f2e97c6baf88d8b4d0814921fac7fb6455 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Fri, 15 Dec 2023 11:04:22 +0000 Subject: [PATCH] skip filter pages by language --- .../StaticContentWorkContextBuilderExtensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VirtoCommerce.Storefront/Domain/StaticContent/StaticContentWorkContextBuilderExtensions.cs b/VirtoCommerce.Storefront/Domain/StaticContent/StaticContentWorkContextBuilderExtensions.cs index efa5b1cd..99b86da9 100644 --- a/VirtoCommerce.Storefront/Domain/StaticContent/StaticContentWorkContextBuilderExtensions.cs +++ b/VirtoCommerce.Storefront/Domain/StaticContent/StaticContentWorkContextBuilderExtensions.cs @@ -40,7 +40,7 @@ IPagedList Factory(int pageNumber, int pageSize, IEnumerable(linkLists, pageNumber, pageSize, linkLists.Count()); } - return builder.WithMenuLinksAsync(new MutablePagedList((Func, IPagedList>) Factory, 1, 20)); + return builder.WithMenuLinksAsync(new MutablePagedList((Func, IPagedList>)Factory, 1, 20)); } public static Task WithPagesAsync(this IWorkContextBuilder builder, IMutablePagedList pages) @@ -66,11 +66,11 @@ public static Task WithPagesAsync(this IWorkContextBuilder builder, Store store, // all static content items IPagedList Factory(int pageNumber, int pageSize, IEnumerable sorInfos) { - var contentItems = staticContentService.LoadStoreStaticContent(store, "pages", builder.WorkContext.IsPreviewMode).Where(x => x.Language.IsInvariant || x.Language == language); + var contentItems = staticContentService.LoadStoreStaticContent(store, "pages", builder.WorkContext.IsPreviewMode); return new StaticPagedList(contentItems, pageNumber, pageSize, contentItems.Count()); } - return builder.WithPagesAsync(new MutablePagedList((Func, IPagedList>) Factory, 1, 20)); + return builder.WithPagesAsync(new MutablePagedList((Func, IPagedList>)Factory, 1, 20)); } public static Task WithBlogsAsync(this IWorkContextBuilder builder, IMutablePagedList blogs)