Skip to main content


Drupal Context Module

Today I was researching some modules for a large project that I am working on and I came across the Context module. This module allows you to setup different conditions and add/remove content from the theme. For example, if I wanted an entire block region removed from a members only region of my site, I would setup my condition to be 'intranet*'. Then, I would set my 'Reactions' to remove the proper template regions from the theme.

Pretty badass!. I'm going to continue learning about this, and will post more as I get deeper into the build of this new project.

Restoring EBS Snapshots for Backup Restore

Today I had the unfortunate need to get a restored database from an Amazon EBS snapshot. To do this I logged into the Amazon AWS management console and determined which snapshot I needed to restore from. Once I highlighted the correct snapshot, I clicked the 'Create Volume' button. Next, I chose which availability zone the snapshot should reside in and click 'Create'

Next, I spun up a new instance of the production server, using the same AMI (ami-294aa340). Once the new instance was created, I attached the volume I created above to the instance and logged into the server.

Setting Dynamic Views Filters With Drupal Using hook_views_query_alter()

Today I had the challenge of generating a view that needed to filter results based on the date/time a node was created. More specifically, I needed to filter bowling stats for a season. Easy, right? The problem I ran into is that the bowling season doesn't begin and end in the same year. So using an argument to only grab nodes created in 2011 didn't work. I needed the view to grab nodes between July, 2010 through July, 2011.