Copied to clipboard

Flag this post as spam?

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


  • Dan Sørensen 102 posts 327 karma points
    Mar 19, 2015 @ 09:53
    Dan Sørensen
    0

    Sort order not working

    Hi I have a problem with sorting my nodes If I sort them in the backend it works like a charm and I can see the right order in the backend but when I get the list of children from currentpage and I debug with visual studio the sort order change ?

    I got this structur

    Parent
       child1  sort int 0
       child2  sort int 1
       child3  sort int 2
    

    But when I do this

    List<Umbraco.Web.Models.DynamicPublishedContent> selection = CurrentPage.Children.Where(x => x.DocumentTypeAlias != "alias").OrderBy(x => x.SortOrder).ToList();
    

    And I debug the selection and see how they order now the structur looks like this

    Parent
       child2  sort int 5
       child3  sort int 6
       child1  sort int 6
    

    I have never experienced this before. I was trying republishing the site because I was thinking it could be a cache issue, but this didn't change anything.

    Im using umbraco 7.2.2

Please Sign in or register to post replies

Write your reply to:

Draft