private void bindPostList(ContentSection section, DataPage <ContentPost> posts, ContentSetting setting) { set("section.Name", section.Title); IBlock block = getBlock("list"); foreach (ContentPost post in posts.Results) { BinderUtils.bindListItem(block, post, ctx); if (setting.ArticleListMode == ArticleListMode.Summary) { block.Set("post.Summary", post.GetSummary(setting.SummaryLength)); } block.Next(); } }
private void bindPosts(DataPage <ContentPost> posts) { IBlock block = getBlock("list"); foreach (ContentPost post in posts.Results) { if (post.PageSection == null) { continue; } if (post.PageSection.SectionType == typeof(TextController).FullName) { continue; } BinderUtils.bindListItem(block, post, ctx); block.Next(); } set("page", posts.PageBar); }