By Fiasst on
Hi,
I'm displaying a list of teasers in a View. I'd like to display the most popular node (in views) first and the least, last.
Is this possible?
Thanks!
Hi,
I'm displaying a list of teasers in a View. I'd like to display the most popular node (in views) first and the least, last.
Is this possible?
Thanks!
Comments
Drupal Statistics Module will help!
Hello,
well the answer is your statistics module shipping with Drupal 5.x and higher. All you have to do is activate the module from core-optional section. Then go to: Administer -> Logs -> Access Log settings. Here navigate to the section an activate the counter.
Now open up your desired view that lists teasers based on popularity (view counts) and choose as a sort criteria. And that should be it? Now all you teasers are sorted based on the total view count of each node.
I hope this will solve your problem.
With best regards,
Mike
Ah, thats brilliant!
I like not having to add more PHP or another module :)
I made use of the 'Recent Hit' criteria because its a nice mix between popularity and giving other nodes a chance to appear at the top.
One thing I noticed though, It says '1 READ' at the bottom of the full node within $links. I'd rather not show how many views these particular nodes have received. Any thoughts?
Thanks for your help!
1 Read link
Pretty sure this is configurable through access control. Check to see who has access to 'view page counters' or something similar.
Dave
My site: http://www.unitorganizer.com/myblog