More in this section
Forums / General Discussions / NewsManager.Content not working

NewsManager.Content not working

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. shahna
    shahna avatar
    7 posts
    03 Jun 2013
    04 Jun 2013
    Link to this post
    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
    07 Jun 2017
    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:

    If you have more questions about using Sitefinity 5.4, please submit them in the corresponding forum section - or contact our support team.


    Boyko Nistorov
    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