Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    Apr 15, 2014 @ 15:17
    Biagio Paruolo
    0

    Get Random(n) Child Nodes: How?

    How get in a macro a n random nodes?

  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    Apr 15, 2014 @ 15:21
    Biagio Paruolo
    0

    Solved:   foreach (var page in startNode.Children.Where("Visible").Random(itemNumber))

    Imports in macro:

    @using System.Collections; 

    @using umbraco.MacroEngines;

    @inherits umbraco.MacroEngines.DynamicNodeContext

  • 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