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
Is there a way to query nodes by uIncrement value? As in, listing content on the frontend by view count?
If you print our uIncrement values, what is it?
There's currently no function for that, the values are stored in the database and not on the node so Alex approach wont work I'm afraid. A real hacky solution is something like this, but remember, each time you use the CounterService it'll create a DB request so it can be quite heavy if you have alot of nodes:
var stats = new Dictionary<IPublishedContent, int>();
foreach (var page in Model.Content.AncestorOrSelf(1).DescendantsOrSelf())
stats.Add(page, CounterService.GetValueBetween(page.Id, DateTime.Now.AddYears(-1), DateTime.Now));
@foreach (var topStats in stats.OrderByDescending(x => x.Value).Take(3))
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted