Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In Umbraco 7 i did the following:
var items = selection.Descendants().Where("Visible").OrderBy("datum desc").GroupBy("datum.Year");
Im trying to achieve the same thing in Umbraco 8 but it only renders one group:
var items = selection.Descendants().Where(x => x.IsVisible() ).OrderByDescending(x => x.Value<DateTime>("datum")).GroupBy(x => x.Value<DateTime>("datum.Year"));
Is it not possible to use the same way with "datum.year"?
Hi Fredik,
I believe you want
.GroupBy(x =>x.Value<DateTime>("datum").Year)
Hope this helps
Matt :)
That worked! So simple :). Thanks!
is working on a reply...
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.
Continue discussion
Not able to group by year
In Umbraco 7 i did the following:
Im trying to achieve the same thing in Umbraco 8 but it only renders one group:
Is it not possible to use the same way with "datum.year"?
Hi Fredik,
I believe you want
Hope this helps
Matt :)
That worked! So simple :). Thanks!
is working on a reply...
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.