Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Asbjørn 75 posts 180 karma points c-trib
    Nov 03, 2014 @ 19:34
    Asbjørn
    1

    Sorting not working

    Sorting datefolders and items does not work in v. 2.1.1. The sort order is set, but the items are never saved:

    static void DoOrder(IEnumerable<IContent> contents)
    {
        var sortOrder = 0;
        foreach (var objChild in contents)
        {
            objChild.SortOrder = sortOrder;
            sortOrder++;
        }
    }
    

    I solved it by just doing this instead:

    static void DoOrder(IEnumerable<IContent> contents)
    {
        ApplicationContext.Current.Services.ContentService.Sort(contents);
    }
    
  • Matthew Wise 195 posts 825 karma points c-trib
    Mar 08, 2016 @ 10:33
    Matthew Wise
    0

    Thanks for this I have implemented this in version 2.1.2

Please Sign in or register to post replies

Write your reply to:

Draft