We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21191
    • 236 Posts
    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?

      ~Shawn Himmelberger
      Check out my MODx Development and MODx Design Company - Himmelberger Design
      • 25663 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
        • 21191
        • 236 Posts
        that could be done with a simple increment script tied to the OnPageRender Event right? (I might be off on the exact event name).

          ~Shawn Himmelberger
          Check out my MODx Development and MODx Design Company - Himmelberger Design
          • 36592
          • 970 Posts
          Why don’t you look into the PageHitCounter plugin in the MODx resource ?
            • 33982 ☆ 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
              • 7434
              • 24 Posts
              It's a quite old post so I hope someone will read it smiley

              I also want to sort the ditto results by popularity (pageviews). Unfortunately Page Hit Counter does not do the job since it has only some basic placeholders. So, I guess the solution with the plugin which increases a TV's value will do the trick. Can someone please help me a bit with that?

              Thanks in advance
              Dimitris