+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Blog Problem

Blog Problem

2 posts, 0 answered
  1. praba karan
    praba karan avatar
    11 posts
    Registered:
    04 Aug 2009
    16 Aug 2009
    Link to this post
    1. How can i get Creator of the Blog Post?
    2. How can i assign Category valeu to Below control via Code
    <sf:ContentCategoriesField ID="Category" runat="server" />
    3. How can i assign Publication date value to   Below control via Code
    <telerik:RadDateTimePicker id="Publication_Date" runat="server" >
     </telerik:RadDateTimePicker>
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    16 Aug 2009
    Link to this post
    Hello praba karan,

    1. How can i get Creator of the Blog Post?

    The creator of the post is the same as the owner of the blog. There are not different authors for post in a particular blog.

    IContent blogcontent = blogManager.Content.GetContent(new Guid("DE524EDF-3790-4CF7-85F1-3555381D13C3")); 
    blogcontent.GetMetaData("Author"); 

    2. How can i assign Category valeu to Below control via Code

    You can use CreateCategory method.

    BlogManager blogManager = new BlogManager(); 
    ICategory category = blogManager.Content.CreateCategory("newCategory"); 

    3. How can i assign Publication date value to   Below control via Code

    Publication date is a metakey, so you can use SetMetaDataMethod.

    IContent blogcontent = blogManager.Content.GetContent(new Guid("DE524EDF-3790-4CF7-85F1-3555381D13C3")); 
    blogcontent.SetMetaData("Publication_Date", TimeValue); 
    blogManager.Content.SaveContent(blogcontent);

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered