Drupal 7 Views with Faceted Filters, without ApacheSolr

Search facets and filtering are a great way to guide your user to the information they are looking for. With facets, we can create an intuitive way for users to narrow down the items that are visible on the screen. Drupal’s core search capability does not provide a way to implement facets, so we need to look at contributed modules to achieve this. In Drupal 6, we would reach for the Apache Solr Search module. This is a great, high performance solution, but it has it’s drawbacks. Installing Solr on your web server can be tricky, and with most shared hosting accounts not even permitted. Fortunately, with Drupal 7 and a few API modules, we can incorporate these wonderful little facets without the need for a full-blown Solr setup. (more…)

Breaking Drupal 7 Webforms into Multiple Steps the Easy Way

I recently played the role of Information Architect on a site remodel. We were charged with the task of doing a brand new build to replace an existing Flash site. One of the priorities of the client was to retain the elaborate Request for Quote form. (more…)

Add AJAX to a Webform in Drupal 7

The Webform module is wonderful. It provides us a quick and easy way to add forms to our site, and takes care of the form handling. And, it’s all done through an easy to use GUI. With the release of Drupal 7, the Form API got tweaked a bit. More specifically, the AJAX handling of forms is now quite a bit more straight ahead. I recently had a site build where I needed a contact form to be submitted using AJAX. A confirmation message would replace the form after a successful submission. Unfortunately, there’s no release of the Webform Ajax module for Drupal 7, so I had 2 choices: 1) Use the Form API, write my own form validations and submit handling to store submissions in the database and send emails out, or 2) use the Webform module and alter it to use AJAX. From the title of this blog, you know that the latter was the winner. Let’s get started.


Using the Pathauto API Drupal Module: A Simple Example

Pathauto is a wonderful tool. It’s definitely my oldest friend when it comes to Drupal modules. As the module has progressed, the API has become easier to use. This means we can make clean and beautiful URLs for our custom Drupal implementations, painlessly. For this example we are going to create a menu callback to display extra information about the blog content type. We will then use the Pathauto API to create the customizable url aliases.


The Scary World of Data Migration… From HTML Pages to Drupal 7, Part 2

So we’ve successfully used QueryPath to extract our data from the flat html files. Now, it’s time to put that data into our Drupal 7 site.

There were some great Drupal 6 modules to handle data imports like Feeds and Node Import. Unfortunately neither of these are fully baked for Drupal 7. Fear not, though, there is a way. As in Drupal 6, you can easily load the Drupal runtime in custom scripts. This gives you access to the full Drupal 7 API, and in the case of data migration, easily allows you to programmatically create nodes. I’ve already set up my content type, and named it “review”. I’ve also set up a folder called “qp” in the Drupal root directory where my custom php file will live. Let’s get started: (more…)