Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This is my workaround:
var tuttiposts = new List<DynamicNode>();
var nodescategories = PostService.Instance.GetPosts(Model.Id);
foreach (var n in nodescategories)
{
allCategories.AddRange(n.uBlogsyPostCategories.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries));
}
// get only distinct categories
IEnumerable<string> elencocategorie = allCategories.Distinct();
if (elencocategorie.Count() > 0){
foreach (var c in elencocategorie)
if ((!string.IsNullOrEmpty(c.Trim())) && (c!="News"))
var posts1 = PostService.Instance.GetPosts(Model.Id, tag, c, author, searchTerm, commenter, page-1, count);
tuttiposts.AddRange(posts1);
var orderedposts = tuttiposts.OrderByDescending(x => x.GetPropertyValue("uBlogsyPostDate")).Distinct().Take(count);
@foreach (DynamicNode n in orderedposts)
...........
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to display posts from some categories
This is my workaround:
var tuttiposts = new List<DynamicNode>();
var nodescategories = PostService.Instance.GetPosts(Model.Id);
foreach (var n in nodescategories)
{
allCategories.AddRange(n.uBlogsyPostCategories.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries));
}
// get only distinct categories
IEnumerable<string> elencocategorie = allCategories.Distinct();
if (elencocategorie.Count() > 0){
foreach (var c in elencocategorie)
{
if ((!string.IsNullOrEmpty(c.Trim())) && (c!="News"))
{
var posts1 = PostService.Instance.GetPosts(Model.Id, tag, c, author, searchTerm, commenter, page-1, count);
tuttiposts.AddRange(posts1);
}
}
}
var orderedposts = tuttiposts.OrderByDescending(x => x.GetPropertyValue("uBlogsyPostDate")).Distinct().Take(count);
@foreach (DynamicNode n in orderedposts)
{
...........
}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.