tags:

views:

64

answers:

2

i would like to have a block on my drupal site(latest version) that displays most read pages on the website

is there any module/code available to achieve this?

-Vivek

A: 

As Drupal does not have "pages" as atomic units but nodes, you probably want to have a list of the most viewed nodes, and then perhaps only of a certain type.

  1. Count the views per node (or content-type), look for a module that does this
  2. Create a view with the Views module that creates the list of most-viewed nodes
  3. Let Views output a block with that list
  4. Display the block where you want it
Niels Bom
which is exactly the path you should follow using the statistics core module mentioned above.
barraponto
+5  A: 

You probably want to take a look at the 'statistics' module that comes with a default Drupal installation. It tracks node views and offers some rudimentary overview pages itself, but its data can be accessed and used from View module views.

Henrik Opel
While this is a quick and easy way to solve the problem, you have to be aware that this causes a write query on every node view, which can cause performance problems on a site with many visitors.
googletorp

related questions