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

Forums / Developing with Sitefinity / get news item data from database tables

get news item data from database tables

5 posts, 1 answered
  1. Reginald Ware
    Reginald Ware avatar
    6 posts
    Registered:
    16 Apr 2010
    22 Apr 2010
    Link to this post
    Hello,

    I installed sitefinity and it is working well. I created categories and news items, looks good so far.

    My scenario is " In home page I need to display a summary of news item of each category ordered by publication date" . Before sitefinity, I was pulling all the data from my database tables and displaying them in  home page. But I do not see all the fields related to news item in sitefinity database tables (ex: summary, author, publication date etc..  in  sf_contentText table)

    I have a visual studio solution for my website. How do I use telerik classes and controls in solution? Please, advise.

    Thank you.

     
    Nischal
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Apr 2010
    Link to this post
    Hi Reginald Ware,

    You could take a look at Finding Content Items. There is a method- GetContent that has 21 overloads  that you can use. You could build a simple user or custom control that will show the data you want.

    All the best,
    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. Reginald Ware
    Reginald Ware avatar
    6 posts
    Registered:
    16 Apr 2010
    22 Apr 2010
    Link to this post
    Thank you.

      when I compile this code:
    Telerik.News.NewsManager nn = new Telerik.News.NewsManager("News");
     
             
              IList listOfNewsItems = nn.Content.GetContent();
              if (listOfNewsItems.Count > 0)
              {
                  foreach (Telerik.Cms.Engine.IContent newsItem in listOfNewsItems)
                      Response.Write(newsItem.GetMetaData("Title") + "<br />");
              }

    Error line : IList listOfNewsItems = nn.Content.GetContent();

    I keep on getting this Build  error :   The type 'Telerik.ManagerBase`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Telerik.Framework, Version=3.7.2096.2, Culture=neutral, PublicKeyToken=dfeaee0e3978ac79'.

    I referenced to this http://www.telerik.com/help/aspnet-ajax/troubleshooting.html but still no luck.  Please, help.

    Thanks,
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Apr 2010
    Link to this post
    Hello Reginald Ware,

    Please take a look at MSDN - How to: Add or Remove References in Visual Studio

    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.
    Answered
  5. Reginald Ware
    Reginald Ware avatar
    6 posts
    Registered:
    16 Apr 2010
    23 Apr 2010
    Link to this post
    Thanks!
Register for webinar
5 posts, 1 answered