drupal 7

Drupal 7 Form API: Using #states with multiple conditionals (AND, OR and XOR)

I've been playing with D7 forms lately and have found #states to be somewhat challenging due to lack of documentation on Form API page.
I've poked around a bit and decided to write a blog with my findings in case someone else is in need of this info down the road.

Drupal 7: When to use Entityqueue vs Draggable Views

This post was inspired by a question our VP Tony asked me while I was working on Entityqueue, he asked, "how is it different from Draggable Views?" At first the answer isn't as obvious, they both allow you to sort items in a list. Draggable Views supports any entity that you can create a View to display. There are a couple key, slight differences that make each one better than the other depending on the use-case and admin experience. In fact, I've used both modules on the same project, depending on the situation.

How to Fix Caching for Views With Exposed Filters in Drupal 7

One of the better features of the views module in Drupal is the ability to cache your view's output. This can come in handy when your view is doing a lot of computation. Caching your view will save your server a lot of unneeded work. One of the big current drawbacks of this feature is if you enable caching for your view and you have an exposed filter, you'll run into the following scenario:

How to Pass Multiple Values through an Exposed Filter in Drupal Views

I regularly work with Views and recently I have had a few odd needs. One of which was when a user selects an item, that item then disappears from the view. The view has exposed filters with AJAX turned on. Since I don’t know how many items I’ll need to filter, I’ll need a way to pass multiple values through an exposed filter. Views apparently does not do this out of the box. If I was filtering on a content field setup for multiple values this may be easier. But no, I am filtering on nids. Since nids are a system field, Views sets the filter handler to 'views_handler_field_numeric'.

Faster Database Backups via Drush! Plus Capistrano Integration

When working with Drupal sites, Drush is your go-to tool. This post is going to focus on the drush sql-dump command. This allows you to export your database to a sql file, so you can restore it later. This can be particularly useful when you are working in a development environment and need to deploy a site to production for the first time. Or when you start work on a new clients existing site, you need to export their live database and download it to your local environment.

How to Write Drupal Update Scripts

This is the second part in my two-part series about Drupal update scripts, specifically focusing on using update scripts for your custom modules as part of your deployment process. You can read the first post about Why You Should Spend the Extra Time to Write Drupal Update Scripts. Now that we know "why" lets talk about "how" and what better way to demonstrate how then look at real-world examples.

Why You Should Spend the Extra Time to Write Drupal Update Scripts

Drupal update scripts are a great way of automating database updates. They are extremely important to contributed modules when changing the database schema and updating existing data to the new schema. Specifically I will be discussing using update scripts in your custom modules as part of deploying new features. I'm not saying update scripts should replace using the Features module, in fact I use them together, update scripts are great for things that might not be managed in features.

Sprinting to Drupal 7 - Interviews with the Drupal.org sprint team

It was sprint time last week here in Portland, where over 20 people came to upgrade Drupal.org up to Drupal 7. There were 5 different teams focusing on different aspects of the project: infrastructure, Git, Project module updates, general upgrade of Drupal.org specific modules, and making the Bluecheese theme responsive.