Copied to clipboard

Flag this post as spam?

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


  • wschwarte 44 posts 73 karma points
    Apr 14, 2015 @ 18:14
    wschwarte
    0

    Sorting CurrentPage.children foreach?

    how can i sort the foreach loop below? 

    foreach (var page in CurrentPage.Children.Where("Visible"))
    {
    }
  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 14, 2015 @ 18:39
    Dennis Aaen
    1

    Hi wschwarte,

    You can do it like this with this you are sort by create date of the page.

    foreach (var page in CurrentPage.Children.Where("Visible").OrderBy("CreateDate desc"))
    {
       
    }

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft