Blogs Comments Issue

Posted by Community Admin on 03-Aug-2018 11:19

Blogs Comments Issue

All Replies

Posted by Community Admin on 19-Mar-2012 00:00

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

Posted by Community Admin on 20-Mar-2012 00:00

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();
           


Greetings,
Boyan Barnev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 22-Mar-2012 00:00

Hi Boyan Barnev

Thanks for ur help.

This thread is closed