Drupal 7 Rules Filter: Manage and search your Drupal rules

By shane
Thu, 2014-12-18 07:18
1 comments
Daily Dose of Drupal Episode #186

Share with Others

The Drupal Rules Filter Module is a simple module that makes it easy to sort through a long list of Drupal Rules. This is a module that is especially useful on those larger scale Drupal websites that rely heavily on the rules module and have many contributed Drupal modules installed.

It categorizes and adds a search box to the Rules UI page that makes instant search possible. It's very similar to the Module Filter module. The Module Filter module makes searching Drupal modules easy, the Rules Filter module makes searching Drupal rules easy.

There is not much configuration needed for the Drupal 7 Rules Filter module. Just make sure you download the List.js plugin to your sites/all/libraries folder (placing the list.min.js file in a listjs folder).

What do you think of the Drupal 7 Rules Filter module? Do you think it's a module you would use when building out a bigger Drupal 7 website?

Hello everyone and welcome to another Daily Dose of Drupal. Today we’re on Episode Number 186. I am Shane Thomas, you can follow me on Twitter at smthomas3. Today we’re going to be going over the Rules Filter Module. The Rules Filter Module makes it easy to manage large lists of rules. So if you’re familiar with the Rules Module you may know that if you’re building a larger Drupal website and using a lot of contributing modules that use Rules, the list can become a little bit unmaintainable.

There can be a large number of items in the list and just makes them hard to sort through and find what you’re looking for. Before we jump into that make sure to check out codekarate.com, check out the 5 Secrets to becoming a Drupal 7 Ninja EBook, check out all the other videos and post and let us know if you have any ideas or things that you’d like to see.

So we’re going to go ahead and get started. If you head on over to the Rules Filter page on drupal.org you’ll notice that it’s not a very popular module yet, however it’s relatively new so you can go ahead and you have old sites that use a lot of rules and it will be something that may help you if you’re still actively working on those sites. One thing to note when you’re installing this is it requires the List JS Plugin.

So I’ll show you in a little bit what that means and how you install that but we’re going to start by going to our development site. So if we first go to the Rules page on this development site you’ll notice it looks just it normally should. It’s a relatively long list. I have a few contributed modules like Drupal Commerce on a few others that add rules to this list. It’s not too big yet but it could be getting there if I add just a few more modules. So we’re going to start by turning on this Rules Filter Module, and one thing you’ll notice, if you notice the way that my Module’s page works, if you’re familiar with the Module Filter you’ll know that that’s how this is working but the Rules Filter is built to work pretty much the same way.

So it looked very familiar if you’re used the Module Filter Module before. So I can go ahead and turn on the Rules Filter Module you’ll notice I have Rules and Rules UI on, so I click Save and as soon as this loads I will head on over to the Rules page and you’ll notice that it still looks the same and I get this message saying The List JS Plugin has not been installed. So if you click this link here to download the List JS Plugin it will bring you to this website.

You click this Compress button to download the compress version of List JS and then depending on however your local development setup is, whether you’re using another server or whether you have it locally, you’ll need to make sure in your sites all libraries folder you create a List JS folder all lower case and you drag the list.min.js into that List JS folder.

There’s also a Drush command that you can use so you can use Drush which I highly recommend. You can run a Drush command Drush Rules Filter Plugin to download this List JS Plugin. So now if we refresh this page you’ll notice it looks much more the module’s page. There’s an Easy Search here and you can see it’s instantaneous. As soon as you start typing it filters down the list. There’s also categories on the left which help you search through based on different modules or tags on the Rules. So you can go ahead and check out this module.

There’s really not much more to it in that. It’s a really simple easy to add and easy to use module that depending on your site might be useful. I wouldn’t say you’ll need it if you’re just using a few rules or there but it is something that can be very useful if you’re building out a large scale Drupal site with a lot of contributed modules and a site that really relies on using the Rules Module. So go ahead and give it a try, let us know what you think and we’ll be back again next time. Thanks for watching.

Comments

Lo there, Shane!

In fact yes, I think I will try it in my upcoming website. Been procrastinating for a few weeks, but it's time to proceed now. I'll be sure to check back and tell you how the filter meshed with the rest!

Cheers.

Post new comment