Recipe 15: All-time Popular, and Recent popular Blocks—removing the hit count
Note
Ingredients
Statistics module, and Count content views enabled, as in Recipe 14.
In this recipe, we place the statistics blocks on the page. We will explore a theming modification, and explain why the theme function is necessary. We also note an alternative to using these views-created blocks to view popular content.
Adding the blocks to a region
Override the popular_recent and popular_alltime default views. Overriding a block is covered in Recipe 11 (to review: simply add the default view, and save). This has the effect of also enabling the view, so you do not need to explicitly click on Enable.
Go to the Block configuration page. Add popular_recent and popular_alltime to the regions of your choice, and click on Save blocks (it's becoming increasingly fashionable to use footers for blocks such as these, though sidebars are still common). Each block include the node titles, followed by the hit or read count in...