More in this section

Forums / Developing with Sitefinity / Blog Like Module

Blog Like Module

7 posts, 0 answered
  1. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    15 Sep 2009
    Link to this post
    I have created some modules that inherit from the generic content module.
    Now, i would like to change them to be more like the blog module in the way that it has two levels.

    Blog
    Posts - (generic content based module)

    Can anyone tell me how i could achieve that?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    15 Sep 2009
    Link to this post
    Hi Andrew,

    Please take at the following article Command Panel: Adding commands manually.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    18 Sep 2009
    Link to this post
    That is sertainly an interesting article.
    I don't quite understand how this relates to my problem though.

    Perhaps i was not clear enough on what i need.

    I have created a new generic_content based module called barker.
    Each barker consists of a totle, content, and image.
    So now i have a list of those barkers.

    Barker1
    Barker2
    etc.

    Just like in the in Generic Content or News Module.
    What i would ike to have is something like the blogs or lists module.
    Where there is also a parent group.

    Like this:
    GroupA
        Barker1
        Barker2
    GroupB
        BarkerX
        BarkerZ

    Just like in Blogs:
    BlogA
        Post1
        Post2
    BlogB
        PostX
        PostZ

    How can i do that?
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Sep 2009
    Link to this post
    Hi Andrew,

    You should crate a custom methods, for instance in your Module manager that returns the GroupA and Barker1 and Barker2.

    Sample code

     
        public IList GetBaker(string sortExp, params Guid[] GroupIDs) 
        { 
     
            return this.contentProvider.GetContent(0, 0, sortExp, nullnull, GroupIDs, null); 
             
        } 
        private ContentProviderBase contentProvider; 

    The idea is that you should gave a Parent ID with which you should associate your bakers.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    06 Oct 2009
    Link to this post
    I am sorry, but i don't understand what you mean.

    A custom method where? A method that does what?

    Lets try it this way.

    Is the solution to this A:

    Create the whole mechanism from scratch?
    Create my own tables in which i keep Group Names IDs etc.
    Then create completely custom control and command panels.

    Or is it B

    There is some mechanism within the system to do this.
    Perhaps the generic_content has an ability to keep ParentIDs?
    Or maybe generic_content can have children?
    Or perhaps some other way?

    A
  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    09 Oct 2009
    Link to this post
    Hello Andrew,

    I will elaborate on the Blogs module and how it is implemented. 

    It is inhering from the Generic Content, which means that it takes the IContent object functionality. Then we have implemented an IBlog interface and IBlogProvider which can work with Blog objects. Each of this Blog objects has an ID, which we store in the ParentID of the IContent item. That way, we create IContent->IBlog relation. 
    On the provider level, we can filter the posts (IContent) we take by IBlog, in other words by the same relation.

    Does this make sense?

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Andrew
    Andrew avatar
    202 posts
    Registered:
    05 Jun 2009
    11 Oct 2009
    Link to this post
    Yes, that does make it clearer, thank you very much.

    A
Register for webinar
7 posts, 0 answered