Recipe 14: All-time Popular, and Recent Popular Pages
Note
Ingredients
Statistics module, enabled
Site visitors are generally curious about the content other visitors enjoy. The popular_alltime and popular_recent default views are associated with the Statistics module. Both views create a block and a tabbed page. In this recipe we look at the tabbed pages.
Enabling Statistics
Enable the core Statistics module at
/admin/build/modules
, if it is not already enabled.Go to Administer | Logs | Access log settings, at
admin/logs/settings
.Enable Count content views.
If you do not take this step, the two statistics views will not know how to determine what's popular, and the Reads or Recent Hits columns will be empty. This step is not retroactive, so if your site has been running for a year, but you've only just enabled the content view counts, your counters will start at 0.
Overriding the Default Views
Go to the Administer views page, and enable both the popular_recent, and popular_alltime views (the...