Try Now
More in this section

Forums / General Discussions / Blogs Comments Issue

Blogs Comments Issue

3 posts, 0 answered
  1. MARI
    MARI avatar
    17 posts
    31 Aug 2011
    19 Mar 2012
    Link to this post
    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
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    28 Aug 2017
    20 Mar 2012
    Link to this post
    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();

    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
  3. MARI
    MARI avatar
    17 posts
    31 Aug 2011
    22 Mar 2012
    Link to this post
    Hi Boyan Barnev

    Thanks for ur help.
3 posts, 0 answered