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

Forums / General Discussions / NewsManager.Content not working

NewsManager.Content not working

2 posts, 0 answered
  1. shahna
    shahna avatar
    7 posts
    Registered:
    03 Jun 2013
    04 Jun 2013
    Link to this post
    Hi,
    I am creating a custom news widget that display the latest NewsItem only. And am using the below code

    NewsManager man = new NewsManager("News");
    IList listofAll = man.Content.GetContent("Publication_Date DESC");
    IContent cnt = listofAll[0] as IContent;

    But i am getting this error
     'Telerik.Sitefinity.Modules.News.NewsManager' does not contain a definition for
    'Content' and no extension method 'Content' accepting a first argument of type
    'Telerik.Sitefinity.Modules.News.NewsManager' could be found (are you missing a
    using directive or an assembly reference?)

    Am using Sitefinity 5.4. Is it the problem of version i am using. How can i correct this? Please help
  2. Boyko Nistorov
    Boyko Nistorov avatar
    16 posts
    Registered:
    17 Oct 2016
    06 Jun 2013
    Link to this post
    Hello Shahna,

     
    Thank you for using Sitefinity.

    The code sample you have quoted in your post is based on Sitefinity 3.7 API which is different platform than Sitefinity 5.4.

    You can refer to our Documentation for more details.

    To answer your question, you can see the section about the News module code samples:

    http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/modules/news/querying-news-items

    If you have more questions about using Sitefinity 5.4, please submit them in the corresponding forum section - http://www.sitefinity.com/developer-network/forums/general-discussions- or contact our support team.

    Regards,

    Boyko Nistorov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested 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