Welcome to www.pietervanleuven.be! My little playground on the web, and - as you can see - a work in progress. I use this domain to test some scripts, ideas and craft around.
One of the things I liked with Wordpress was the post structure. The full URL for a post being:
http://domainname.bla/weblog/2011/01/01/full-title-of-blogpost
The date representation allows filtering by (parts of) the date. I wanted to keep this after migrating to Drupal 7. Implementing this on Drupal 7 needs configuration of 2 parts: a content type and a view. We configure the URL for the content type to include the date in the correct format. The view is configured to allow the visitor to see an overview of the posts, filtered by (parts of) the date.
weblog/[node:created:custom:Y]/[node:created:custom:m]/[node:created:custom:d]/[node:title]
This will include the different parts (year, month, day) of the creation of a post into the url alias pointing to that node.
Direct links to our new content type are handled now. Now the handling for the view.
Show Content of type Post tagged with sorted by Newest first
/weblog
We've created a simple view at this moment. We want this view to handle the following URL's:
http://domainname.bla/weblog/2011
http://domainname.bla/weblog/2011/01
http://domainname.bla/weblog/2011/01/01
The different date parts are parameters. These parameters are called 'Contextual filters'. Follow these steps to configure them:
Recent comments