Popular Posts Widget

Topics: Core, Customizing Orchard, General, Writing modules
Jan 11, 2015 at 4:52 PM
Is there any OOB module for popular posts? AFAIK Nick Mayne has made an attempt but seems outdated. My opinion is that this should be given as a Sort Criterion for Detail dislpay type. If anyone knows something pls inform me or point me where to start...
Thank you
Developer
Jan 14, 2015 at 7:10 PM
I don't know about one but this is not a trivial task, given that (because of output caching) you can't just count how many times a post was displayed (that is, if you want to measure popularity by view count). You'd need client-side tracking, maybe calling into a Web API endpoint to count views. Or maybe it's better to fetch this info from Google Analytics.
Jan 15, 2015 at 5:17 PM
I am on that actually (Google Analytics) but it is only for info purposes. If someone want to order by popularity then we have a problem. So, I think this should be built in for every content type (per shape?).
Developer
Jan 15, 2015 at 5:28 PM
As I mentioned you can't just detect view count, even less popularity, which is not necessarily equal to view count (what if the post that got the most social shares should be the most "popular"?). You can build a part and a record that contains an arbitrary popularity score, then you can order by that, or you can write a Projector filter that determines the popularity dynamically.

None of these is something that IMO can be solved in a generic way and thus built into Orchard.