More in this section

Forums / Developing with Sitefinity / Get Generic Contents Programmatically.

Get Generic Contents Programmatically.

2 posts, 0 answered
  1. Adeel Arif
    Adeel Arif avatar
    27 posts
    30 Dec 2009
    22 Mar 2010
    Link to this post
    Hi All ,

    Hope You are all fine, I have a requirement that i want to have a control which lists all the generic contents Category wise, means i pass an id and according to that id i have a category and from that category all the generic contents should be displayed. e.g

    Contents heading 1
    Contents text and images.
    Contents heading 2
    Contents text and images.

    I thought of the way that if i could access the generic contents in programmatic way i could do it. i wanted to ask is their a better way , or like a recommended way to do that and how if i am going in the right direction how do i get the Generic contents?????

    Thanks ,

    Adeel Arif
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    22 Mar 2010
    Link to this post
    Hi Adeel Arif,

    You could create a control that inherits from ContentView. Inside CreateChildControls() you could use ContentfilterBuilder to filter the items based on your

    If you pass the category ID, get the Category Name from ICategory object and pass it to ContentFilterBuilder.

    If you pass the Content ID, you could call GetMetaData("Category") of IContent object and then conduct the filtering.

    Sincerely yours,
    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.
2 posts, 0 answered