Implement the popular post and monthly archive feature using View module

Unlike Movable Type which I used before, Drupal does not come with native 'monthly archive' feature. This feature that every blogger might require could be implmented through the use of 'View module'. and others website features like the 'popular post' or 'recent comments' for drupal also come with the View module.

What is View module

View module is like some window you look through to see the website content, the content could be node(article), comments etc. we could define our own 'window' so that content with defined characteristic could be pulled out and displayed to the visitor. It is one of the most important modules for drupal and will be the native core module for drupal future release.

After the view module is installed and enabled, It comes with some predefined views for the most common feature a website need.

and here 's a list of the most useful predefined view:

  • popular - list the most popular articles which is based on the number of times being visited
  • archive - categorize the contents by month
  • comments_recent - the recent comment of the website
  • glossary - categorize the contents by the title letter
  • frontpage - replace the default frontpage with the defined view

Steps to implement the 'monthly archive' feature

To activate these feature, all you have to do is to enable the corresponding view

  1. download the View module cause drupal does not come with it natively for the 4.x-6.x version but It is said that It will be in the core of drupal since 7.x.
  2. extract the file under directory 'sites/all/modules'
  3. enable the view module at 'Site building->Modules'
  4. enable the predefined view 'archive' at 'Sites building->Views'
  5. place the 'archive' content at the page layout by configuring block at 'Site building->blocks'

the content will appear on the block automatically. It is really easy!

This is only a simple use of the View module, It is a very powerful and the base module of a lot of advanced modules !