Last active
December 8, 2017 22:23
-
-
Save walalm/af85075a1fe1633f02d9b905149de9d5 to your computer and use it in GitHub Desktop.
Group Umbraco Content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var members = Umbraco.TypedContent(9999).Children("membersList") | |
.Where(x => x.IsVisible()).OrderBy("order"); | |
int chunkSize = 3; | |
var memberGroups = members.Select((x, i) => new { Index = i, Value = x }) | |
.GroupBy(x => x.Index / chunkSize) | |
.Select(x => x.Select(v => v.Value).ToList()) | |
.ToList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment