My memory tells me MODx used to keep a page view count, I don’t think this is the case anymore. Anyone have ideas for making a "Most popular" ditto listing?
-
MODX Staff
- 12,272 Posts
You’d need to create a plugin that increases the value of a TV by one on each page for every visit, then use DItto to sort by that value.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
that could be done with a simple increment script tied to the OnPageRender Event right? (I might be off on the exact event name).
Why don’t you look into the PageHitCounter plugin in the MODx resource ?
-
☆ A M B ☆
- 476 Posts
Anyone have ideas for making a "Most popular" ditto listing?
I used the Page Hit Counter (
http://modxcms.com/Page-Hit-Counter-878.html) plus this Snippet (
http://modxcms.com/Page-Hit-Counter-Results-2180.html) that works in conjunction with the Page Hit Counter to output the most popular pages. They work great together. I’m not not sure if you had a specific need for them to work with Ditto (b/c they’re completely separate).
I set up this on a test site ... you can see it in action here:
http://modxtest.aldriena.com/index.php?id=54
Precision Web Development ... SmashStack.com