More in this section

Forums / Developing with Sitefinity / Sort News Item by date - sitefinity admin side

Sort News Item by date - sitefinity admin side

3 posts, 1 answered
  1. Hydo L
    Hydo L avatar
    98 posts
    Registered:
    31 Mar 2010
    04 Jul 2010
    Link to this post
    On the news module (in Sitefinity), the news items are not displaying in order of Publication Date. Latest should be at the top, i.e. go to Modules > News and view all the news items
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    04 Jul 2010
    Link to this post
    Hi Hydo L,

    You could map NewsItemsList.ascx external template ( How to map a template  ). Inside the template there is a js function called DataBindGrid where you could set sortExpressionsAsSQL to Publication_Date DESC.

    function DataBindGrid(currentPageIndex, pageSize, sortExpressionsAsSQL, filterExpressionsAsSQL) {
        var requiredMetaFields = ['Title', 'Author', 'Source', 'Publication_Date', 'Expiration_Date'];
        var cultureInfoField = document.getElementById('<%= cultureInfoField.ClientID %>');
        Telerik.Cms.Engine.Services.ContentService.GetContentItems(currentPageIndex * pageSize, pageSize,
        "Publication_Date DESC", filterExpressionsAsSQL, requiredMetaFields, cultureInfoField.value, dataProviderName, updateGrid, OnFailed);
    }


    Greetings,
    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
  3. Hydo L
    Hydo L avatar
    98 posts
    Registered:
    31 Mar 2010
    05 Jul 2010
    Link to this post
    Thank you very much man. Its working perfectly!

    Hydo L
Register for webinar
3 posts, 1 answered