Thursday, August 23, 2012

Creating a monthly archive block with Drupal 7 views


The level of experience that makes things easy in one version of Drupal can make tasks jarring in another. In Drupal 6, I have expertise with every level of views -- the normal stuff, like fields, filtering, and rewriting, plus more advanced features like arguments. With the Views Custom Field module, I can even use PHP to make views even more customizable. Getting that same level of familiarity with Drupal 7 views will be a challenge, but it's a fun challenge.
First views project in D7: Creating a monthly archive block for my right column. A pre-packaged version ships with the views module, but creating my own served as a crash course for Drupal 7 views. I started from the D6 tutorial at Chris Shattuck's blog, and referred to the pre-packaged version to fill in the gaps.
The goal of this tutorial is to create a block you can stick in a side column that displays linked months with a post count, and a page for each month so your visitors have somewhere to go when they click the linked months. Without further ado, here you go.

Thank to http://www.webbykat.com/comment/108 

No comments: