Copied to clipboard

Flag this post as spam?

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


  • ChristophC 21 posts 60 karma points
    Mar 24, 2016 @ 13:27
    ChristophC
    0

    Random Selection

    Hey!

    I have a selection to ChildPages from the CurrentPage:

    var selection = CurrentPage.Site().Children().Where("Visible");
    

    Everytime I start the selection, I want the result in a random sequence.

    How does this work?

    Thanks, Christoph

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Mar 24, 2016 @ 13:48
    Dennis Adolfi
    102

    Try:

    var selection = CurrentPage.Site().Children().Where("Visible").RandomOrder();
    
  • ChristophC 21 posts 60 karma points
    Mar 24, 2016 @ 14:01
    ChristophC
    1

    Thanks a lot! Dennis AdolfiĀ“s solution works :-)

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Mar 24, 2016 @ 14:08
    Dennis Adolfi
    0

    Glad that it helped you Christoph! Have a great day and good luck with the rest of the site!

Please Sign in or register to post replies

Write your reply to:

Draft