Copied to clipboard

Flag this post as spam?

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


  • ChristophC 22 posts 61 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 6450 karma points MVP 6x c-trib
    Mar 24, 2016 @ 13:48
    Dennis Adolfi
    102

    Try:

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

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

  • Dennis Adolfi 1082 posts 6450 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!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies