Review: Views Hacks Drupal Module

The Views Hacks module is a new project that adds several useful bits and pieces to the standard Drupal Views system. It consists of five separate modules:

Views PHP AccessViews PHP Access Plugin

This is a simple module that gives you the ability to add a snippit of PHP code to control views access, instead of using the standard Permission or Role based access control.

Views Filters Auto-submit

This module auto-submits exposed filters when they are changed. This is nice if you are using dropdown (select) type filters, however configuartion for this module is quirky. You must configure the use of autosumit at the page level with a form that looks like the Block Configure form. So, you can choose "Autosubmit works on only these pages" or "...on all pages except these pages." However, you can't change this option on a field by field basis. This means if you use both an exposted text field and a dropdown on the same view, both of them autosubmit when they are changed. Still, turning exposed dropdown filters into jump menus is handy.

Views Hacks Reset ButtonViews Filters Reset

This adds a "Reset" button to exposed filters. Plain and simple, this should really be part of Views.

Views Taxonomy Summary

This module provides a summary style plugin suitable for displaying hierarchical taxonomies. There are other modules that do this, and it can be done to some degree with the Views module alone. However, it usually requires two different views: one for the hierarchy of terms and one for the nodes once you have drilled down to the term-level.  This module combines these two functions into a single summary view.

Views Selective Exposed FiltersViews Selective Exposed Filters

This module restricts exposed filter values to those present in the result set. I've actually needed this before myself and wrote a form_alter to do it for the specific view I was using, so I'm glad that someone has created a general solution to this problem. The configuration is straightforward, as can be seen in the screenshot to the right. Unfortunately, this module doesn't actually work right now. After enabling this feature, I got an error message when loading my view. Views Hacks does not have an official stable release yet, though. So, it's not surprising that there still some bugs. When this module is finished, it should be great for things like taxonomy terms and CCK fields.