Blogs Comments Issue
Hi ,
i created blog posts in different language.
but the comments show all total comments,
i need comments for particular language post. please give idea for do that...
thanks in advance
by,
selvam
Hi Selvam,
Please find below a sample demonstrating how you can obtain the comments count of a blog post programatically:
public
void
GetBlogsComments()
BlogsManager blogsManager = BlogsManager.GetManager();
//Get the master version.
BlogPost blogPost = blogsManager.GetBlogPosts().Where(b => b.Status == ContentLifecycleStatus.Live).FirstOrDefault();
if
(blogPost !=
null
)
// Get the live version
blogPost = blogsManager.Lifecycle.GetLive(blogPost)
as
BlogPost;
// Get the comment
var aaa = blogsManager.GetComments().ToList();
aaa.Count();
Hi Boyan Barnev
Thanks for ur help.