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

Forums / Developing with Sitefinity / Advanced sorting for News

Advanced sorting for News

4 posts, 0 answered
  1. jkregala
    jkregala avatar
    159 posts
    Registered:
    22 Sep 2009
    09 Nov 2011
    Link to this post
    Hello, I've been tinkering with the Sorting of News articles for NewsFrontendList. I wonder if what I entered in the field for SortExpression is allowable. Please check the attached image.

    We're trying to emulate a Knowledge base using Sitefinity, and we want news articles to list down sorted by view/hits count.

    Thanks.
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    11 Nov 2011
    Link to this post
    Hi Jkregala,

    Out of the box sorting by any field, be it one that's default for the provider, or a custom field is no problem. In the current case, if you'll be sorting Videos, ViewsCount is a valid property of the type, and you can sort your items by it. Please let us know if you are experiencing any problems with this functionality, well be glad to help.

    Kind regards,
    Boyan Barnev
    the Telerik team
    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
  3. jkregala
    jkregala avatar
    159 posts
    Registered:
    22 Sep 2009
    14 Nov 2011
    Link to this post
    We're trying this for News article list. Is that possible? I tried once and I got an error. Should I use the value ViewsCount?
  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    28 Aug 2017
    16 Nov 2011
    Link to this post
    Hello Jkregala,

    I can confirm that we do have a property ViewsCount for the NewsItem class, and sorting by this property works fine, I have just tested this on a local project running on Sitefinity 4.3. Please let us know if you have any problems setting up this functionality, we'll be glad to help.

    Regards,
    Boyan Barnev
    the Telerik team
    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
4 posts, 0 answered