Skip to content

Commit

Permalink
skip filter pages by language
Browse files Browse the repository at this point in the history
  • Loading branch information
basilkot committed Dec 15, 2023
1 parent 3f6abcd commit ba3e63f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ IPagedList<MenuLinkList> Factory(int pageNumber, int pageSize, IEnumerable<SortI
return new StaticPagedList<MenuLinkList>(linkLists, pageNumber, pageSize, linkLists.Count());
}

return builder.WithMenuLinksAsync(new MutablePagedList<MenuLinkList>((Func<int, int, IEnumerable<SortInfo>, IPagedList<MenuLinkList>>) Factory, 1, 20));
return builder.WithMenuLinksAsync(new MutablePagedList<MenuLinkList>((Func<int, int, IEnumerable<SortInfo>, IPagedList<MenuLinkList>>)Factory, 1, 20));
}

public static Task WithPagesAsync(this IWorkContextBuilder builder, IMutablePagedList<ContentItem> pages)
Expand All @@ -66,11 +66,11 @@ public static Task WithPagesAsync(this IWorkContextBuilder builder, Store store,
// all static content items
IPagedList<ContentItem> Factory(int pageNumber, int pageSize, IEnumerable<SortInfo> 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<ContentItem>(contentItems, pageNumber, pageSize, contentItems.Count());
}

return builder.WithPagesAsync(new MutablePagedList<ContentItem>((Func<int, int, IEnumerable<SortInfo>, IPagedList<ContentItem>>) Factory, 1, 20));
return builder.WithPagesAsync(new MutablePagedList<ContentItem>((Func<int, int, IEnumerable<SortInfo>, IPagedList<ContentItem>>)Factory, 1, 20));
}

public static Task WithBlogsAsync(this IWorkContextBuilder builder, IMutablePagedList<Blog> blogs)
Expand Down

0 comments on commit ba3e63f

Please sign in to comment.