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 1583 posts 1814 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 1583 posts 1814 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

Please Sign in or register to post replies

Write your reply to:

Draft