There is no real documentation, that I can find anyways, on how to use GroupBy.
I am getting the Creator Names from multiple nodes. This means that the Creator name shows up multiple times. How would I group them so the Creator names are grouped together?
How do you use GroupBy in Razor
There is no real documentation, that I can find anyways, on how to use GroupBy.
I am getting the Creator Names from multiple nodes. This means that the Creator name shows up multiple times. How would I group them so the Creator names are grouped together?
Thanks
Found my answer.
<ul>
string parentCurrent = "";
foreach(dynamic node in @Model.NodeById(1089).Descendants("ScienceResearchUpdatesPost").OrderBy("CreatorName"))
{
if (parentCurrent != node.CreatorName)
{
<li>@node.CreatorName</li>
}
parentCurrent = node.CreatorName;
}
</ul>
You could also just do like I have described here:
http://our.umbraco.org/forum/templating/templates-and-document-types/56965-GroupBy-Issue#comment206450
is working on a reply...