More in this section

Forums / Developing with Sitefinity / List all category,Author,Tags of Blogs

List all category,Author,Tags of Blogs

8 posts, 1 answered
  1. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    01 Jul 2010
    Link to this post
    Hi,
    How to List all category,Author,Tags of Blogs module in separate gridview.


    Regards
    Asit
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    01 Jul 2010
    Link to this post
    Hi asit pani,

    You could take a look at

    The Author is generally metakey of IContent item, so you can us GetMetaData method. If you are working with IBlog object the Author is a property.
    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    01 Jul 2010
    Link to this post
    Hi Ivan,

    I used this code, but still not getting any blogs category.

    // create new instance of ContentManager
    Telerik.Cms.Engine.ContentManager contentManager = new Telerik.Cms.Engine.ContentManager();
    // create a list of all categories
    IList listOfCategories = contentManager.GetCategories();
    if (listOfCategories.Count > 0)
    {
     foreach(Telerik.Cms.Engine.ICategory catItem in listOfCategories)
        Response.Write(catItem.CategoryName + "<br />");
    }
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    01 Jul 2010
    Link to this post
    Hello asit pani,

    You have to pass the provider name as a parameter of ContentManager class that you are creating.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    01 Jul 2010
    Link to this post
    Hi ivan,

    I found how to get category and tag using this blog.
    http://www.sitefinity.com/blogs/ivandimitrov/ivanposts/09-12-09/filter_categoriestree_control_by_blog.aspx

    But i can't find how to get the Authors.

    i m using  this
    Telerik.Cms.Engine.MetaSearchInfo filter = new Telerik.Cms.Engine.MetaSearchInfo(Telerik.Cms.Engine.MetaValueTypes.LongText, "Author", "Author");
            
            IList meta = blogManager.Content.GetMetaData(filter);


    But it's showing this error.

    The method or operation is not implemented.



    plz help me.
  6. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    02 Jul 2010
    Link to this post
    Hi iVan

    can u plz tell me how to get all autthor names of all Blogs.
  7. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    02 Jul 2010
    Link to this post
    Hello asit pani,

    You can get all blogs sorted by author name and then get all names of authors using a foreach:
    IList blogs = this.manager.GetBlogs("Author");
    List<ListItem> bloggersList = new List<ListItem>();
    foreach (IBlog blog in blogs)
    {
        if (!String.IsNullOrEmpty(blog.Author))
        {
            ListItem li = new ListItem();
            li.Text = blog.Author;
        }
    }


    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  8. Asit
    Asit avatar
    87 posts
    Registered:
    07 Nov 2009
    02 Jul 2010
    Link to this post
    Hi Radoslav ,

    Thanks. It solves my problem.
Register for webinar
8 posts, 1 answered