Copied to clipboard

Flag this post as spam?

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


  • Luca Annuiti 16 posts 76 karma points
    Mar 27, 2015 @ 16:45
    Luca Annuiti
    0

    OrderBy("sortOrder") not working

    I'm trying to sort node with this code:

    CurrentPage.Children.Where("Visible").OrderBy("sortOrder")

    but is seems not working with sortOrder, is OK with other value (Id, Name, ecc)

    Anyone can help me ?

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Mar 28, 2015 @ 09:35
    Dave Woestenborghs
    0

    hi Luca,

    By default the Umbraco API will return the children of a item in the sortorder set in the backend. So you don't need to do this sorting yourself.

    You only need to do sorting yourself when you want to sort on other properties like Name, Date, etc..

     

    Dave

Please Sign in or register to post replies

Write your reply to:

Draft